This is the mail archive of the
mailing list for the glibc project.
Re: [RFC 1/2][BZ #12674] Remove assembly versions of semaphores.
- From: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- To: libc-alpha at sourceware dot org
- Date: Fri, 06 Dec 2013 09:00:00 -0200
- Subject: Re: [RFC 1/2][BZ #12674] Remove assembly versions of semaphores.
- Authentication-results: sourceware.org; auth=none
- References: <20131206103626 dot GA20423 at domone dot podge>
On 06-12-2013 08:36, OndÅej BÃlka wrote:
> Hi, when I looked to bug 12674 I found that a x86 and x64 assembly
> implementations just duplicate generic version without noticable performance
> benefit (If barrier is needed could be simply done by platform-specific
> macro if its needed).
> I looked what are other architectures that do this, main one is sparc,
> David could you comment on that?
> Then there is sh that also looks like duplicate.
> And there is alpha which contains only
> -/* ??? This is an ass-backwards way to do this. We should simply define
> - the acquire/release semantics of atomic_exchange_and_add. And even if
> - we don't do this, we should be using atomic_full_barrier or otherwise. */
> -#define __lll_rel_instr "mb"
> -#include <nptl/sysdeps/unix/sysv/linux/sem_post.c>
> After this is settled we could fix semaphore race conditions at once.
+1 for this change. Sometime I asked myself why some archs really need the
specific implementations and why the generic one is not suffice.