about summary refs log tree commit diff
path: root/malloc/thread-m.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-07-01 08:31:38 +0000
committerUlrich Drepper <drepper@redhat.com>2003-07-01 08:31:38 +0000
commitb5d5b67be3e624efa7f44df4375dfdfffa1f97cb (patch)
treec3ba187098d3aa88a83200ab4a5c4c384abc9124 /malloc/thread-m.h
parent96c814d3d866eff5a86599cbe567ca167189c7ea (diff)
downloadglibc-b5d5b67be3e624efa7f44df4375dfdfffa1f97cb.tar.gz
glibc-b5d5b67be3e624efa7f44df4375dfdfffa1f97cb.tar.xz
glibc-b5d5b67be3e624efa7f44df4375dfdfffa1f97cb.zip
Update.
2003-05-04  H.J. Lu  <hongjiu.lu@intel.com>

	* malloc/arena.c (arena_get2): Add atomic_write_barrier.
	* malloc/thread-m.h: Include <atomic.h>.
	(atomic_full_barrier): Provide default.
	(atomic_read_barrier): Likewise.
	(atomic_write_barrier): Likewise.
	* sysdeps/ia64/bits/atomic.h (atomic_full_barrier): New #define.
Diffstat (limited to 'malloc/thread-m.h')
-rw-r--r--malloc/thread-m.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/malloc/thread-m.h b/malloc/thread-m.h
index da8bbf36f8..1dcaed0514 100644
--- a/malloc/thread-m.h
+++ b/malloc/thread-m.h
@@ -31,6 +31,7 @@
 
 #if defined(_LIBC) /* The GNU C library, a special case of Posix threads */
 
+#include <atomic.h>
 #include <bits/libc-lock.h>
 
 #ifdef PTHREAD_MUTEX_INITIALIZER
@@ -306,4 +307,16 @@ typedef void *tsd_key_t;
 
 #endif /* defined(NO_THREADS) */
 
+#ifndef atomic_full_barrier
+# define atomic_full_barrier() __asm ("" ::: "memory")
+#endif
+
+#ifndef atomic_read_barrier
+# define atomic_read_barrier() atomic_full_barrier ()
+#endif
+
+#ifndef atomic_write_barrier
+# define atomic_write_barrier() atomic_full_barrier ()
+#endif
+
 #endif /* !defined(_THREAD_M_H) */