This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: need to use lll_futex_wake_unlock in new code for glibc 2.4
- From: Daniel De La Zerda <ddelazerda007 at yahoo dot com>
- To: Carlos O'Donell <carlos at systemhalted dot org>
- Cc: libc-help at sourceware dot org
- Date: Sat, 4 Apr 2009 11:31:13 -0700 (PDT)
- Subject: Re: need to use lll_futex_wake_unlock in new code for glibc 2.4
- References: <417788.84467.qm@web63205.mail.re1.yahoo.com> <119aab440904030420s1c3cf682lf53515719c90fc90@mail.gmail.com> <694828.32567.qm@web63202.mail.re1.yahoo.com> <119aab440904041055k2ee04a59g89fd5fc4f85c2b9d@mail.gmail.com>
- Reply-to: Daniel De La Zerda <danieldelazerda at gmail dot com>
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.