summaryrefslogtreecommitdiff
path: root/nptl/sysdeps/x86_64
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-04-14 17:30:34 +0000
committerUlrich Drepper <drepper@redhat.com>2003-04-14 17:30:34 +0000
commitbd4f43b462aadbe49bece8a7d6b62381ee90f690 (patch)
treee5ea730e440688410b87dea9eee7b92e71d6777f /nptl/sysdeps/x86_64
parent18a8e730da98560330ba4dd3ead6f62f050c4ae7 (diff)
Update.
2003-04-14 Jakub Jelinek <jakub@redhat.com> * sysdeps/i386/i486/bits/atomic.h: Rename LOCK to LOCK_PREFIX. * sysdeps/x86_64/bits/atomic.h: Likewise. 2003-04-14 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/i386/sysdep.h: Change PUSHARGS_1 and POPARGS_1 to emit labels for the mov instructions. 2003-04-14 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h (ret_NOERRNO): Define.
Diffstat (limited to 'nptl/sysdeps/x86_64')
-rw-r--r--nptl/sysdeps/x86_64/tls.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/nptl/sysdeps/x86_64/tls.h b/nptl/sysdeps/x86_64/tls.h
index 975d20f3fa..ab13f25431 100644
--- a/nptl/sysdeps/x86_64/tls.h
+++ b/nptl/sysdeps/x86_64/tls.h
@@ -67,6 +67,14 @@ typedef struct
/* Get the thread descriptor definition. */
# include <nptl/descr.h>
+#ifndef LOCK_PREFIX
+# ifdef UP
+# define LOCK_PREFIX /* nothing */
+# else
+# define LOCK_PREFIX "lock;"
+# endif
+#endif
+
/* This is the size of the initial TCB. */
# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t)
@@ -267,7 +275,7 @@ typedef struct
({ __typeof (descr->member) __ret; \
__typeof (oldval) __old = (oldval); \
if (sizeof (descr->member) == 4) \
- asm volatile (LOCK "cmpxchgl %2, %%fs:%P3" \
+ asm volatile (LOCK_PREFIX "cmpxchgl %2, %%fs:%P3" \
: "=a" (__ret) \
: "0" (__old), "r" (newval), \
"i" (offsetof (struct pthread, member))); \
@@ -280,7 +288,7 @@ typedef struct
/* Atomic set bit. */
#define THREAD_ATOMIC_BIT_SET(descr, member, bit) \
(void) ({ if (sizeof ((descr)->member) == 4) \
- asm volatile (LOCK "orl %1, %%fs:%P0" \
+ asm volatile (LOCK_PREFIX "orl %1, %%fs:%P0" \
:: "i" (offsetof (struct pthread, member)), \
"ir" (1 << (bit))); \
else \