summaryrefslogtreecommitdiff
path: root/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-03-12 05:45:00 +0000
committerUlrich Drepper <drepper@redhat.com>2003-03-12 05:45:00 +0000
commit5a03acfe371193faace69e5517864ba3b9fc2b9f (patch)
tree7d92152ecdd4461da2692f4fa399609341eac44a /nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
parentb874af999547ee4e7688fc07710786131eef7d1b (diff)
Update.
* sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax. * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise. * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise. * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax. * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack): Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads. * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB] (create_thread): Likewise. Define __pthread_multiple_threads and __libc_multiple_threads_ptr. * init.c (__pthread_initialize_minimal_internal): Initialize __libc_multiple_threads_ptr if necessary. * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare __pthread_multiple_threads and __libc_multiple_threads_ptr. * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define __libc_multiple_threads. (__libc_pthread_init): Return pointer to __libc_pthread_init if necessary. * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant. (THREAD_SETMEM_NC): Likewise. * sysdeps/x86_64/pthread_spin_trylock.c: Removed. * sysdeps/x86_64/pthread_spin_trylock.S: New file. * sysdeps/x86_64/pthread_spin_unlock.c: Removed. * sysdeps/x86_64/pthread_spin_unlock.S: New file. * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock): Eliminate one entire instruction.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
index f7e9450a1a..122b1c7ab0 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
@@ -90,7 +90,7 @@ extern int __lll_mutex_unlock_wait (int *__futex) attribute_hidden;
".previous\n" \
"2:" \
: "=a" (result), "=&D" (ignore1), "=&S" (ignore2), \
- "=&d" (ignore2), "=m" (futex) \
+ "=&d" (ignore3), "=m" (futex) \
: "0" (1), "4" (futex), "m" (timeout) \
: "memory", "cx", "cc", "r10"); \
result; })
@@ -245,14 +245,15 @@ extern int lll_unlock_wake_cb (int *__futex) attribute_hidden;
int __ignore; \
register __typeof (tid) _tid asm ("edx") = (tid); \
if (_tid != 0) \
- __asm __volatile ("1:\tmovq %1, %%rax\n\t" \
+ __asm __volatile ("xorq %%r10, %%r10\n\t" \
+ "1:\tmovq %3, %%rax\n\t" \
"syscall\n\t" \
"cmpl $0, (%%rdi)\n\t" \
"jne 1b" \
: "=&a" (__ignore) \
- : "i" (SYS_futex), "D" (&tid), "r10" (0), \
- "S" (FUTEX_WAIT), "d" (_tid) \
- : "memory", "cc", "r11", "cx"); \
+ : "S" (FUTEX_WAIT), "i" (SYS_futex), "D" (&tid), \
+ "d" (_tid) \
+ : "memory", "cc", "r10", "r11", "cx"); \
} while (0)
extern int __lll_timedwait_tid (int *tid, const struct timespec *abstime)