libthr shared locks

Daniel Eischen deischen at
Thu Feb 18 17:10:01 UTC 2016

On Thu, 18 Feb 2016, Konstantin Belousov wrote:

> On Wed, Feb 17, 2016 at 12:37:52PM -0500, Daniel Eischen wrote:
>> On Wed, 17 Feb 2016, Konstantin Belousov wrote:
>>> I do plan to introduce inlined objects (most likely in the form of
>>> libthr2 initially, i.e. cc -D_LIBTHR2 -o file file.c -lthr2). But my
>>> plans are to get the existing patch for pshared into the tree for 11.0.
>>> After that I wanted to implement robust mutexes, still in the context of
>>> the libthr. Then libthr2.
>> As soon as this is done, will we build FreeBSD base OS against
>> the new API?  So only ports would be affected.
> I do not think this is feasible.  Base system does not have any significant
> thread consumers, might be only ntpd qualifies.  Small things like ngctl
> are not that important.
> But base system provides C++ runtime for ports and I suspect that libc++
> depends on the libthr ABI. Even jemalloc depends on libthr ABI. So
> changing only the base ABI is probably impossible, from the first look
> the switch like WITH_LIBTHR2_DEFAULT would be a flag day. Anyway, this
> must be considered carefully during the later stage of the libthr2
> development, right now it is rather empty speculation on my side.

I would think partially inlined objects (still a pointer inside)
could be made in libthr (not libthr2) by default for 11.0 (or 11.x).
So that the only change is the size of the objects, not anything
else.  The only breakage would be layout related.


More information about the freebsd-threads mailing list