sem_trywait changes broke sparc

Torvald Riegel triegel@redhat.com
Mon Jan 26 18:20:00 GMT 2015


On Mon, 2015-01-26 at 13:20 +0100, Torvald Riegel wrote:
> I'm not sure whether this works as-is for pre-v9 sparc, or you need to
> adapt -- I would have to study the pre-v9 atomics definition again to
> know this.  AFAIR, atomics do work but you don't use a custom lock in
> the semaphore, but one from a global array of locks.  So, using just the
> atomics might lead to decreased contention between unrelated semaphores.

I'll have to correct that.  This statement isn't correct with
process-shared semaphores because the global array of locks used for
normal atomics on pre-v9 is per-process.  I think you have to maintain a
custom version of the semaphore to solve that issue.



More information about the Libc-alpha mailing list