libthr shared locks

Konstantin Belousov kostikbel at
Mon Feb 15 14:44:17 UTC 2016

On Mon, Feb 15, 2016 at 02:17:20PM +0000, Martin Simmons wrote:
> Is pthread_barrier_destroy making the wrong comparison?
> +	if (barrier == THR_PSHARED_PTR) {
> I think this should be *barrier.
You are right, thank you for noticing.
I uploaded

> Also, a general question: why not use some flag in the barrier (and other
> objects) to indicate pshared, removing the need for __thr_pshared_offpage
> except in init?

But where would I keep the object ? All that I have with the current
ABI is a single pointer, which de facto behaves like the flag which you
proposed. It is either real pointer or (if set to some specific value
impossible for a valid pointer) there is an offpage.

More information about the freebsd-threads mailing list