summaryrefslogtreecommitdiff
path: root/nptl/sysdeps/x86_64
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-05-09 18:40:14 +0000
committerJakub Jelinek <jakub@redhat.com>2009-05-09 18:40:14 +0000
commit8075bb0fc6925bfb43f0db8e9c5bf22eb9e9f119 (patch)
tree08716fe3e8c25a9732600ec718325785e5352c33 /nptl/sysdeps/x86_64
parent83489168c2447e3fe351dbb302b1026dc9fc512c (diff)
Updated to fedora-glibc-20090509T1828cvs/fedora-glibc-2_10-1
Diffstat (limited to 'nptl/sysdeps/x86_64')
-rw-r--r--nptl/sysdeps/x86_64/tls.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/nptl/sysdeps/x86_64/tls.h b/nptl/sysdeps/x86_64/tls.h
index 172f44579b..ea89f3b1a2 100644
--- a/nptl/sysdeps/x86_64/tls.h
+++ b/nptl/sysdeps/x86_64/tls.h
@@ -1,5 +1,5 @@
/* Definition for thread-local data handling. nptl/x86_64 version.
- Copyright (C) 2002-2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2002-2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -312,6 +312,17 @@ typedef struct
__ret; })
+/* Atomic logical and. */
+#define THREAD_ATOMIC_AND(descr, member, val) \
+ (void) ({ if (sizeof ((descr)->member) == 4) \
+ asm volatile (LOCK_PREFIX "andl %1, %%fs:%P0" \
+ :: "i" (offsetof (struct pthread, member)), \
+ "ir" (val)); \
+ else \
+ /* Not necessary for other sizes in the moment. */ \
+ abort (); })
+
+
/* Atomic set bit. */
#define THREAD_ATOMIC_BIT_SET(descr, member, bit) \
(void) ({ if (sizeof ((descr)->member) == 4) \