[Top][All Lists]

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

Re: POSIX semaphore for GNU/Hurd

From: Michal 'hramrach' Suchanek
Subject: Re: POSIX semaphore for GNU/Hurd
Date: Thu, 7 Nov 2002 14:13:18 +0100
User-agent: Mutt/1.4i

On Wed, Nov 06, 2002 at 08:59:30PM -0500, Neal H. Walfield wrote:
> > I tried to make it return errno and be async-cancel resistant.
> Why do you want it to be async-cancel resistant?  The functions are
> not defined as being async-cancel safe; only pthread_cancel,
> pthread_setcancelstate and pthread_setcanceltype are.
I see, async cancellation is even uglier than  I thught..
> > Anyway the header should be basically the same, just the implementation
> > changes a bit.
> The macros are incredibly ugly; please remove them.  Your code does
removed the uglier part
> not conform to the GNU coding standards; this will have to be fixed.
> You did not implement most of my suggestions in my previous emails on
> this subject.
It was intended as an improvemenet of the previos code, not complete rewrite :)
The nice part about this implementation is 
  - you have priorities handled in the condition (perhaps __thread_wakeup does
    it too, I do not know)
  - it can be used anywhere (modulo cancellation modes) not only on the Hurd :)
Of cource, it's probably slow.

I do not understand what is exported about the mutex_t.
The bits/semaphore.h is not easy to attach, had to change to diff for that.

Michal Suchanek

Attachment: semaphore.diff
Description: Text document

reply via email to

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