Skip to contentSkip to conversation

question on atomic_t

DISCUSSION Matthew Wilcox 1 participant 1 message Apr 22, 2001

lore
Share & tools
lore
#0 lore raw
Quoted 3 lines

can I assume that a member of a structure of type atomic_t is 0 after using memset to zero on the structure ?

You must not do this. use atomic_init instead. on parisc, the locked value of a spinlock is 0, so no more updates to that atomic value would ever work.

Signature · 1 line
Revolutions do not require corporate support.