bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hurd_condition_wait


From: Thomas Bushnell, BSG
Subject: Re: Hurd_condition_wait
Date: 19 Nov 2002 12:04:33 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de> writes:

> On Sun, Nov 17, 2002 at 12:24:03PM -0500, Neal H. Walfield wrote:
> > > Is there a race condition before __pthread_block? We can receive
> > > pthread_broadcast before we have blocked.
> > > If so, how do we solve that? 
> > 
> > As I said in a previous email, a __pthread_wakeup queues a message on
> > the waiter's port (using mach_msg).  If this happens before the waiter
> > calls does a receive on his port (i.e. via __pthread_block calling
> > mach_msg), then it will be there when the waiter arrives.  If it
> > happens after the waiter calls mach_msg then the waiter gets the
> > message.  Thus, no race.
> 
> What about non-Mach backends?  I would feel better about an
> internal-interface-guarantee argument rather than an implementation
> argument.

We need a reliable wakeup/block mechanism.  In Mach, the one Neal
describes is fine.  If we need a different one, so be it.  Regardless,
the wakeup and block routines should of course guarantee the behavior
that Neal describes.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]