aboutsummaryrefslogtreecommitdiff
path: root/include/atomic.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-12-21 21:50:33 +0000
committerUlrich Drepper <drepper@redhat.com>2006-12-21 21:50:33 +0000
commitfc242bef00206c3bab4117345734ce744f0b7eff (patch)
tree8eaf53937aa9e43d99ea7e520329907b6c313b79 /include/atomic.h
parent571511d557820b9ddbc400b7922f8904387ff78c (diff)
downloadglibc-fc242bef00206c3bab4117345734ce744f0b7eff.zip
glibc-fc242bef00206c3bab4117345734ce744f0b7eff.tar.gz
glibc-fc242bef00206c3bab4117345734ce744f0b7eff.tar.bz2
* include/atomic.h (atomic_forced_read): New macro.
Diffstat (limited to 'include/atomic.h')
-rw-r--r--include/atomic.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/atomic.h b/include/atomic.h
index ec1e989..2ad8b5f 100644
--- a/include/atomic.h
+++ b/include/atomic.h
@@ -497,6 +497,12 @@
#endif
+#ifndef atomic_forced_read
+# define atomic_forced_read(x) \
+ ({ __typeof (x) __x; __asm ("" : "=r" (__x) : "0" (x)); __x; })
+#endif
+
+
#ifndef atomic_delay
# define atomic_delay() do { /* nothing */ } while (0)
#endif