From 92d83c725e09dbc76acfedc1cf85a01f9f54452d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 9 May 2003 03:17:42 +0000 Subject: Update. 2003-05-08 Ulrich Drepper * malloc/thread-m.h: Remove special handling of thread_atfork if HAVE_register_atfork_malloc is defined. --- nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h') diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h index b54ebbfca4..8e1742b671 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h @@ -41,6 +41,31 @@ #define LLL_MUTEX_LOCK_INITIALIZER (0) +#define lll_futex_wait(futex, val) \ + do { \ + int __ignore; \ + register __typeof (val) _val asm ("edx") = (val); \ + __asm __volatile ("xorq %%r10, %%r10\n\t" \ + "syscall" \ + : "=a" (__ignore) \ + : "0" (SYS_futex), "D" (&futex), "S" (FUTEX_WAIT), \ + "d" (_val) \ + : "memory", "cc", "r10", "r11", "cx"); \ + } while (0) + + +#define lll_futex_wake(futex, nr) \ + do { \ + int __ignore; \ + register __typeof (nr) _nr asm ("edx") = (nr); \ + __asm __volatile ("syscall" \ + : "=a" (__ignore) \ + : "0" (SYS_futex), "D" (&futex), "S" (FUTEX_WAKE), \ + "d" (_nr) \ + : "memory", "cc", "r10", "r11", "cx"); \ + } while (0) + + /* Does not preserve %eax and %ecx. */ extern int __lll_mutex_lock_wait (int *__futex, int __val) attribute_hidden; /* Does not preserver %eax, %ecx, and %edx. */ -- cgit v1.2.3