From: Nishanth Aravamudan <nacc@us.ibm.com>
To: Al Borchers <alborchers@steinerpoint.com>
Cc: david-b@pacbell.net, greg@kroah.com, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] add wait_event_*_lock() functions
Date: Fri, 11 Feb 2005 09:31:18 -0800 [thread overview]
Message-ID: <20050211173118.GA2372@us.ibm.com> (raw)
In-Reply-To: <1108105628.420c599cf3558@my.visi.com>
On Fri, Feb 11, 2005 at 01:07:08AM -0600, Al Borchers wrote:
>
>
> On Thursday 10 February 2005 9:39 am, Nishanth Aravamudan wrote:
> >> It came up on IRC that the wait_cond*() functions from
> >> usb/serial/gadget.c could be useful in other parts of the kernel. Does
> >> the following patch make sense towards this?
>
> Sure, if people want to use these.
>
> I did not push them because they seemed a bit "heavy weight",
> but the construct is useful and general.
I think that is very much the case. As I was setting up patches for the
Kernel-Janitors to clean up the wait-queue usage in the kernel, I found
I was unable to use wait_event*(), as locks needed to be
released/grabbed around the sleep. wait_event_*_lock() fixes this
problem, clearly :)
> The docs should explain that the purpose is to wait atomically on
> a complex condition, and that the usage pattern is to hold the
> lock when using the wait_event_* functions or when changing any
> variable that might affect the condition and waking up the waiting
> processes.
I will submit a new patch which documents the general structure of the
wait_event_*() class of functions, including what you have written.
Thanks,
Nish
next prev parent reply other threads:[~2005-02-11 17:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-11 7:07 [RFC PATCH] add wait_event_*_lock() functions Al Borchers
2005-02-11 17:31 ` Nishanth Aravamudan [this message]
2005-02-11 19:55 ` [RFC UPDATE PATCH] add wait_event_*_lock() functions and comments Nishanth Aravamudan
2005-02-12 11:38 ` Arnd Bergmann
2005-02-12 13:28 ` Sergey Vlasov
2005-02-13 2:41 ` Arnd Bergmann
2005-02-13 5:00 ` Nish Aravamudan
2005-02-15 1:04 ` Nishanth Aravamudan
2005-02-15 17:50 ` Arnd Bergmann
2005-02-15 18:19 ` Nish Aravamudan
-- strict thread matches above, loose matches on Subject: below --
2005-02-10 17:39 [RFC PATCH] add wait_event_*_lock() functions Nishanth Aravamudan
2005-02-10 18:21 ` David Brownell
2005-02-10 18:37 ` Nishanth Aravamudan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050211173118.GA2372@us.ibm.com \
--to=nacc@us.ibm.com \
--cc=alborchers@steinerpoint.com \
--cc=david-b@pacbell.net \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox