Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Feb 2016 16:44:10 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Martin Simmons <martin@lispworks.com>
Cc:        vangyzen@FreeBSD.org, threads@FreeBSD.org, arch@FreeBSD.org
Subject:   Re: libthr shared locks
Message-ID:  <20160215144410.GT91220@kib.kiev.ua>
In-Reply-To: <201602151417.u1FEHKwL003392@higson.cam.lispworks.com>
References:  <20151223172528.GT3625@kib.kiev.ua> <56BE69B8.9020808@FreeBSD.org> <20160213143815.GB91220@kib.kiev.ua> <201602151417.u1FEHKwL003392@higson.cam.lispworks.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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 https://www.kib.kiev.ua/kib/pshared/pshared.3.patch

> 
> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160215144410.GT91220>