This is the mail archive of the libc-help@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: need to use lll_futex_wake_unlock in new code for glibc 2.4


So, how do I use x86_64's implementation of lll_futex_wake_unlock? I'm writing my own version of pthread_cond_signal() and it doesn't pick it up from <lowlevellock.h>...

Daniel



----- Original Message ----
From: Carlos O'Donell <carlos@systemhalted.org>
To: Daniel De La Zerda <danieldelazerda@gmail.com>
Sent: Saturday, April 4, 2009 1:55:40 PM
Subject: Re: need to use lll_futex_wake_unlock in new code for glibc 2.4

On Fri, Apr 3, 2009 at 12:14 PM, Daniel De La Zerda
<ddelazerda007@yahoo.com> wrote:
> Ok, here is a better question... I see that lll_futex_wake_unlock is defined in for example "nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h". I'm building code that has lll_futex_wake_unlock() for x86_64. I'm guessing my build fails because lll_futex_wake_unlock is not defined in "nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h". What would be the difference from the sparc code for lll_futex_wake_unlock to the equivalent x86_64 code? Can I add the same sparc definition code for that function to "x86_64/lowlevellock.h"?

Each target can implement lll_futex_wake_unlock as they wish, and
implement some of the core algorithms differently.

Yes, you can definately add lll_futex_wake_unlock to x86_64/lowlevellock.h.

The only code that uses lll_futex_wake_unlock is
pthread_cond_signal.c, which x86_64 implements using assembly, so
therefore it doesn't need a *seperate* implementation of
lll_futex_wake_unlock, it is inlined into x86_64's version of
pthread_cond_signal.S.

Cheers,
Carlos.



      


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