[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTimZnUEM6FFbgw==K3w6hURAgsAO8uRh5W1v6f_j@mail.gmail.com>
Date: Wed, 1 Sep 2010 20:04:24 -0500
From: David Nicol <davidnicol@...il.com>
To: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Is there a primitive to atomically release a spinlock and go to sleep?
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?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists