[interfacekit] Re: BScreen (again)

"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() :-)

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.
We could also find out how R5 solves this, if it does.

Adios...
   Axel.


Other related posts: