[Xcb] [libpthread-stubs] fix semaphore signal safety

Jamey Sharp jamey at minilop.net
Thu Oct 8 08:53:49 PDT 2009


On Thu, Oct 8, 2009 at 4:08 AM, Julien Danjou <julien at danjou.info> wrote:
> At 1253982451 time_t, Jamey Sharp wrote:
>> An alternative question: If the semaphore functions aren't related to
>> pthreads, why are we adding them to pthread-stubs?
>
> Is there a chance someone says yes or no so that I can revert or not the
> patch adding them?

Sorry, I started a draft at XDC last week then got sidetracked.

Short answer: Let's revert, at least for now.

I was trying to get a better sense of who this is useful to and why,
and haven't gotten enough from Samuel to justify this extension of
pthread-stubs.

On Sat, Sep 26, 2009 at 10:01 AM, Samuel Thibault
<samuel.thibault at ens-lyon.org> wrote:
> It will help when somebody wants to use semaphores but doesn't want to
> carry the pthread-safe overhead of the pthread library on OSes where the
> semaphore are actually in the pthread library.

After chatting with Bart about this, it seems like those OSes are
broken. And yes, I'm aware that GNU libc is one of those
implementations.

I think the problem is that we haven't clearly defined what
pthread-stubs is for. I think it's for POSIX thread-API stubs, and
specifically for those that should do nothing in single-threaded
applications.

Jamey


More information about the Xcb mailing list