On Sat, Dec 07, 2013 at 21:32, Vadim Zhukov wrote:
> 2013/12/7 Ted Unangst <[email protected]>:
>> On Sat, Dec 07, 2013 at 14:11, Vadim Zhukov wrote:
>>> This patch fixes problems in KDE4, that relies on sharing (process-shared)
>>> semaphores via mmap(). This feature is used in the wild, so if we claim
>>> that we support process-shared semaphores, we have to implement it, too.
>>>
>>> This changes the sem_t definition: it becomes a synonim to struct __sem
>>> instead of being a pointer to it. This way we allow apps to have sem_t in
>>> shared memory via sem_init() and thus share it between processes (by,
>>> e.g., mmap()'ing the same file). Of course, this forces a major library
>>> version bump.
>>
>> This requires more thought. If the introduction of pshared support is
>> breaking things, maybe just that part can be reverted for now.
> 
> Well, it's the half-done introduction of pshared support is breaking
> things. I do not see any fallout now that sharing unnamed semaphores
> works. But what we'll gain with revert? Except that it's still better
> than current situation.

One of the hallmarks of the original libpthread was that all data
structures were opaque, and hidden via pointers. That in turn made it
possible to write a binary compatible librthread. I never would have
started librthread if it hadn't been for that compatibility. So I
don't like turning my back on it. Exposing the size of sem_t is a
*major* step.



Reply via email to