On Sat, Dec 21, 2013 at 12:42, Mark Kettenis wrote:
> As Ted pointed out, the size of the struct (or union) becomes part of
> the ABI.  So we should probably reserve a bit more space than we
> actually need for the implementation.  That way, we'll leave some room
> for experimentation.  Wasting a bit more memory shouldn't be a big
> issue as typical code that uses semaphores won't be constructing
> thousands of these.  And rounding up to the nearest power of two
> should be pretty much free.

Something I've also belatedly realized is we are in effect already
exposing internals via sem_open. Two programs with two different
majors of libpthread.so can open the same named semaphore, but it may
be different internally. We should add a version number inside the
semaphore to prevent that from happening.

Reply via email to