This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: sem_trywait changes broke sparc
- From: Torvald Riegel <triegel at redhat dot com>
- To: David Miller <davem at davemloft dot net>
- Cc: libc-alpha at sourceware dot org, carlos at redhat dot com
- Date: Mon, 26 Jan 2015 18:26:12 +0100
- Subject: Re: sem_trywait changes broke sparc
- Authentication-results: sourceware.org; auth=none
- References: <20150125 dot 120841 dot 833492068378554220 dot davem at davemloft dot net> <1422274812 dot 29655 dot 72 dot camel at triegel dot csb>
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.