This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.16-ports-merge-171-g51a9ba8


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  51a9ba860ae3305d475f43f568e8fa51b8a53b6e (commit)
      from  cc184e11fe3d3624c0ff622e018abc608346a342 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=51a9ba860ae3305d475f43f568e8fa51b8a53b6e

commit 51a9ba860ae3305d475f43f568e8fa51b8a53b6e
Author: Maxim Kuvyrkov <maxim@codesourcery.com>
Date:   Mon Aug 13 19:31:00 2012 -0700

    Add explicit acquire/release semantics to atomic_exchange_and_add.

diff --git a/ChangeLog b/ChangeLog
index 0377ac9..2adf44c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-08-13  Maxim Kuvyrkov  <maxim@codesourcery.com>
+
+        * include/atomic.h (atomic_exchange_and_add): Split into ...
+        (atomic_exchange_and_add_acq, atomic_exchange_and_add_rel): ... these.
+        New atomic macros.
+
 2012-08-13  Markus Trippelsdorf  <markus@trippelsdorf.de>
 
 	* sysdeps/x86_64/fpu/libm-test-ulps: Update.
diff --git a/include/atomic.h b/include/atomic.h
index 3ccb46d..bc20772 100644
--- a/include/atomic.h
+++ b/include/atomic.h
@@ -198,8 +198,12 @@
 
 
 /* Add VALUE to *MEM and return the old value of *MEM.  */
-#ifndef atomic_exchange_and_add
-# define atomic_exchange_and_add(mem, value) \
+#ifndef atomic_exchange_and_add_acq
+# ifdef atomic_exchange_and_add
+#  define atomic_exchange_and_add_acq(mem, value) \
+  atomic_exchange_and_add (mem, value)
+# else
+#  define atomic_exchange_and_add_acq(mem, value) \
   ({ __typeof (*(mem)) __atg6_oldval;					      \
      __typeof (mem) __atg6_memp = (mem);				      \
      __typeof (*(mem)) __atg6_value = (value);				      \
@@ -213,8 +217,18 @@
 						   __atg6_oldval), 0));	      \
 									      \
      __atg6_oldval; })
+# endif
 #endif
 
+#ifndef atomic_exchange_and_add_rel
+# define atomic_exchange_and_add_rel(mem, value) \
+  atomic_exchange_and_add_acq(mem, value)
+#endif
+
+#ifndef atomic_exchange_and_add
+# define atomic_exchange_and_add(mem, value) \
+  atomic_exchange_and_add_acq(mem, value)
+#endif
 
 #ifndef catomic_exchange_and_add
 # define catomic_exchange_and_add(mem, value) \

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog        |    6 ++++++
 include/atomic.h |   18 ++++++++++++++++--
 2 files changed, 22 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]