lkml.org 
[lkml]   [2004]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [1/4] standardize bit waiting data type
On Fri, Sep 03, 2004 at 11:53:55AM +0200, Martin Wilck wrote:
>> Why don't you need a do..while loop any more ?
>> There is also no loop in __wait_on_bit() in the completed patch series.

On Fri, Sep 03, 2004 at 02:42:47AM -0700, William Lee Irwin III wrote:
> Part of the point of filtered waitqueues is to reestablish wake-one
> semantics. This means two things:
> (a) those waiting merely for a bit to clear with no need to set it,
> i.e. all they want is to know a transition from set to
> clear occurred, are only woken once and don't need to loop
> waking and sleeping
> (b) Of those tasks waiting for a bit to clear so they can set it
> exclusively, only one needs to be woken, and after the first
> is woken, it promises to clear the bit again, so there is no
> need to wake more tasks.

Also, (a) still works in the presence of signals with interruptible
waits (which the VM and VFS do not now use); the sleeping function is
required to return -EINTR or some other nonzero value to indicate
abnormal termination, which in turn must be checked by the caller.


-- wli
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.035 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site