* Is there a primitive to atomically release a spinlock and go to sleep?
@ 2010-09-02 1:04 David Nicol
2010-09-02 2:16 ` Andy Lutomirski
0 siblings, 1 reply; 2+ messages in thread
From: David Nicol @ 2010-09-02 1:04 UTC (permalink / raw)
To: Linux Kernel Mailing List
I'm trying to do something involving multiple kthreads in an ioctl
handler, and I want to avoid the
race condition between the third and fourth steps of
acquire mutex
add &self to a list of threads which will get awakened by
something else that is also aware of this list
release mutex
go to sleep
Is there a standard atomic go-to-sleep function that takes as a
parameter a pointer to spinlock to release after its state is set to
TASK_INTERRUPTIBLE?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-02 2:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-02 1:04 Is there a primitive to atomically release a spinlock and go to sleep? David Nicol
2010-09-02 2:16 ` Andy Lutomirski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.