WaitQueues.
Roland Dreier
roland at topspincom.com
Wed Feb 14 03:22:11 EST 2001
Ralph> Is there anyway to contionally initialize a wait queue. I
Ralph> want to test a wait queue to see if has been initialized
Ralph> not initialize it. If not, how do I serialize an access to
Ralph> a set location so that I can atomically test and increment
Ralph> that location?
I'm not sure about doing init_waitqueue_head() conditionally, but as
for atomic test and increment, you could use atomic_t (look at
asm/atomic.h). That gives you atomic_inc_and_test_greater_zero()
among other things. If you just want to set a flag,
test_and_set_bit() may be simpler.
Roland
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
More information about the Linuxppc-embedded
mailing list