libthr shared locks
deischen at freebsd.org
Thu Dec 24 18:46:32 UTC 2015
On Thu, 24 Dec 2015, John Baldwin wrote:
> On Thursday, December 24, 2015 08:45:38 AM Daniel Eischen wrote:
>> We would include extra/spare words in the struct from day 1.
>> The public struct should just consist of an array of storage
>> units or similar, so that nothing can be gleaned from the
>> elements of the struct. This is what Solaris does (or at least
>> used to).
>> Going forward, I think the sync structures just need to be able
>> to be properly initialized with PTHREAD_FOO_INITIALIZER. If
>> 10 years out the spare words are not enough, we could still
>> allocate remaining storage on first use like we do now.
> You can't allocate extra storage for the PSHARED case. Any changes
> to PSHARED primitives that require altering the layout are full-blown
> ABI breakages the same as the one being contemplated here.
Yes, I know. With spare slots and being able to move anything required
for shared to near the beginning of the struct, I think we'd be good
for quite a while anyway.
Can we still implement things like robust and priority mutexes in a
pshared mutex with Konstantin's implementation? The rest of the world
(Linux, Solaris anyway) use structs and get by just fine ABI-wise.
More information about the freebsd-arch