diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-03-23 10:01:06 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-03-23 10:01:06 +0000 |
commit | e408880b8102768b2fb612a82589a143b04d6302 (patch) | |
tree | d26a78a852532cd39bf83212f025a2a5b7659dc5 /nptl/sysdeps | |
parent | 16b06b70b58461cca36a4aa83559cb89385076ce (diff) | |
download | glibc-e408880b8102768b2fb612a82589a143b04d6302.zip glibc-e408880b8102768b2fb612a82589a143b04d6302.tar.gz glibc-e408880b8102768b2fb612a82589a143b04d6302.tar.bz2 |
Update.
2004-03-23 Ulrich Drepper <drepper@redhat.com>
* sysdeps/ia64/pt-machine.h (BUSY_WAIT_NOP): Define.
* sysdeps/x86_64/pt-machine.h (BUSY_WAIT_NOP): Likewise.
Diffstat (limited to 'nptl/sysdeps')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h index 9f089f8..a9823d8 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h +++ b/nptl/sysdeps/unix/sysv/linux/i386/lowlevellock.h @@ -102,8 +102,13 @@ extern int __lll_mutex_unlock_wake (int *__futex) __attribute ((regparm (1))) attribute_hidden; +/* NB: in the lll_mutex_trylock macro we simply return the value in %eax + after the cmpxchg instruction. In case the operation succeded this + value is zero. In case the operation failed, the cmpxchg instruction + has loaded the current value of the memory work which is guaranteed + to be nonzero. */ #define lll_mutex_trylock(futex) \ - ({ unsigned char ret; \ + ({ int ret; \ __asm __volatile (LOCK_INSTR "cmpxchgl %2, %1" \ : "=a" (ret), "=m" (futex) \ : "r" (LLL_MUTEX_LOCK_INITIALIZER_LOCKED), "m" (futex),\ |