memcpy-ing structs with atomic variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi,

How should I copy one structure to another one, when the
definition includes one atomic variable?

struct kobject is an example.
I think I should copy each and every values rather than issueing a memcpy(). I
am interested to know how memcpy acts upon atomic variables. (Especially when it
is defined to be a structure of volatile int.
include/asm-i386/atomic.h:22:typedef struct { volatile int counter; } atomic_t; 
)

Regards,
Om.

-- 
Death rays don't kill people, people kill people!!

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux