[interfacekit] Re: BScreen (again)

On Mon, 28 Jul 2003 19:35:43 +0200 CEST "Axel Dörfler" <axeld@pinc-
software.de> wrote:
> "Ingo Weinhold" <bonefish@xxxxxxxxxxxxxxx> wrote:
> > > Not tested, but it should work safely AFAICT.
> > Yep, looks good in principle, but it may have problems, since 
> > acquire_sem() is actually an acquire_sem_etc() with timeout. Which 
> > will 
> > cause the counter and the semaphore counter to get out of sync. As 
> > in 
> > BLocker I don't think it is possible to fix this (not without a 
> > further 
> > semaphore at least).
> 
> Indeed, the other safe way to do this would be using delete_sem() :-)

Right. It's a bit unpractical in for this purpose, though. :-)

> Perhaps we want to add a way to release all waiting threads from a 
> semaphore to release_sem(), by settings a magic release count (-1?) 
> or 
> provide a special flag.

Yep, that would be nice.

> We could also find out how R5 solves this, if it does.

Feel free... ;-)

CU, Ingo


Other related posts: