From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Ira W. Snyder" <iws@ovro.caltech.edu>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] misc: add CARMA DATA-FPGA Access Driver
Date: Tue, 8 Feb 2011 11:33:21 -0800 [thread overview]
Message-ID: <20110208193321.GA16527@core.coreip.homeip.net> (raw)
In-Reply-To: <20110208191143.GC10125@ovro.caltech.edu>
On Tue, Feb 08, 2011 at 11:11:44AM -0800, Ira W. Snyder wrote:
> On Tue, Feb 08, 2011 at 09:50:29AM -0800, Dmitry Torokhov wrote:
> > On Tue, Feb 08, 2011 at 09:20:46AM -0800, Ira W. Snyder wrote:
> >
> > > Go back and re-think my loop. This is a
> > > common idiom straight of out LDD3 pages 153-154.
> > >
> > > You should note that it is only possible to exit the loop with the lock
> > > held AND !list_empty(used). The lock protects the used list, and
> > > therefore, there must be a buffer on the list.
> >
> > No, because you are woken up while not holding the lock so another
> > reader is free to take it off the list.
> >
>
> Correct. But then I go around the loop and check list_empty() again
> before exiting the loop. The list MUST NOT be empty before the loop will
> terminate.
Yes, you are right, I competely missed the fact that we'd loop around
and check the condition again. I'll go grab another coffee now.
--
Dmitry
next prev parent reply other threads:[~2011-02-08 19:33 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-07 23:23 [PATCH RFCv4 0/2] CARMA Board Support Ira W. Snyder
2011-02-07 23:23 ` [PATCH 1/2] misc: add CARMA DATA-FPGA Access Driver Ira W. Snyder
2011-02-08 7:33 ` Dmitry Torokhov
2011-02-08 17:20 ` Ira W. Snyder
2011-02-08 17:29 ` Dave Jones
2011-02-08 17:50 ` Dmitry Torokhov
2011-02-08 19:11 ` Ira W. Snyder
2011-02-08 19:33 ` Dmitry Torokhov [this message]
2011-02-09 16:30 ` David Laight
2011-02-09 17:03 ` Ira W. Snyder
2011-02-07 23:23 ` [PATCH 2/2] misc: add CARMA DATA-FPGA Programmer support Ira W. Snyder
-- strict thread matches above, loose matches on Subject: below --
2011-02-08 23:37 [PATCH RFCv5 0/2] CARMA Board Support Ira W. Snyder
2011-02-08 23:37 ` [PATCH 1/2] misc: add CARMA DATA-FPGA Access Driver Ira W. Snyder
2011-02-09 8:33 ` Dmitry Torokhov
2011-02-09 17:35 ` Ira W. Snyder
2011-02-09 18:27 ` Dmitry Torokhov
2011-02-09 23:35 ` Ira W. Snyder
2011-02-09 23:42 ` Dmitry Torokhov
2011-02-10 0:10 ` Ira W. Snyder
2011-02-10 0:39 ` Dmitry Torokhov
2011-02-10 9:02 ` David Laight
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=20110208193321.GA16527@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=iws@ovro.caltech.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.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;
as well as URLs for NNTP newsgroup(s).