Query and behavior confirmation for pthread_barrier_destroy(3)

Rich Felker dalias@libc.org
Mon Sep 7 17:47:52 GMT 2020


On Mon, Sep 07, 2020 at 07:36:10AM +0200, Florian Weimer wrote:
> * Rich Felker:
> 
> >> The intent with the current glibc implementation is that the
> >> synchronization can be achieved using the same barrier (if no thread
> >> blocks again on the barrier after the current round of waiting).  That
> >> is, in your test, thread 2 would have to wait on the barrier as well,
> >> unblocking both tests, and then destroy the barrier.
> >
> > I don't understand what you're saying here. Do you mean that glibc
> > conforms but that you deem this not a conformance requirement, just an
> > implementation-specific property?
> 
> Yes, that's what I meant.  I don't think POSIX formally requires this.

This is going to be the argument with Torvald over mutexes/condvars
and self-synchronized destruction all over again, isn't it?

Rich


More information about the Libc-alpha mailing list