Skip to content

Commit

Permalink
Avoid double definition of catomic_compare_and_exchange_val_acq.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Jelinek authored and Ulrich Drepper committed May 16, 2009
1 parent 6dd7859 commit 3b1b533
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2009-05-12 Jakub Jelinek <jakub@redhat.com>

* include/atomic.h: Formatting.
(catomic_compare_and_exchange_val_acq): Don't define if already
defined by bits/atomic.h.

2009-05-14 Jakub Jelinek <jakub@redhat.com>

* sysdeps/unix/sysv/linux/i386/fallocate64.c (__fallocate64_l64):
Expand Down
19 changes: 10 additions & 9 deletions include/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,15 @@
#endif


#if !defined catomic_compare_and_exchange_val_acq \
&& defined __arch_c_compare_and_exchange_val_32_acq
# define catomic_compare_and_exchange_val_acq(mem, newval, oldval) \
#ifndef catomic_compare_and_exchange_val_acq
# ifdef __arch_c_compare_and_exchange_val_32_acq
# define catomic_compare_and_exchange_val_acq(mem, newval, oldval) \
__atomic_val_bysize (__arch_c_compare_and_exchange_val,acq, \
mem, newval, oldval)
#else
# define catomic_compare_and_exchange_val_acq(mem, newval, oldval) \
# else
# define catomic_compare_and_exchange_val_acq(mem, newval, oldval) \
atomic_compare_and_exchange_val_acq (mem, newval, oldval)
# endif
#endif


Expand All @@ -125,8 +126,8 @@
# define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
__atomic_bool_bysize (__arch_compare_and_exchange_bool,acq, \
mem, newval, oldval)
# else
# define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
# else
# define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
({ /* Cannot use __oldval here, because macros later in this file might \
call this macro with __oldval argument. */ \
__typeof (oldval) __atg3_old = (oldval); \
Expand All @@ -142,8 +143,8 @@
# define catomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
__atomic_bool_bysize (__arch_c_compare_and_exchange_bool,acq, \
mem, newval, oldval)
# else
# define catomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
# else
# define catomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
({ /* Cannot use __oldval here, because macros later in this file might \
call this macro with __oldval argument. */ \
__typeof (oldval) __atg4_old = (oldval); \
Expand Down

0 comments on commit 3b1b533

Please sign in to comment.