2001-04-22 22:15:43

by Oliver Neukum

[permalink] [raw]
Subject: question on atomic_t

Hi list,

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

TIA
Oliver


2001-04-22 22:33:11

by Matthew Wilcox

[permalink] [raw]
Subject: Re: question on atomic_t


> 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.

--
Revolutions do not require corporate support.