This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC 1/2][BZ #12674] Remove assembly versions of semaphores.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]