diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-01-17 18:35:16 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-01-17 18:35:16 +0000 |
commit | eed242a60ff70c57f6ca72274a9f62961dedb067 (patch) | |
tree | 515b4e0c1646d03a15213847579e1c5e97982b2a /sysdeps/i386/i486 | |
parent | 1db88b33daf3eb514bebc4cd38868e89916ec6e0 (diff) | |
download | glibc-eed242a60ff70c57f6ca72274a9f62961dedb067.tar.gz glibc-eed242a60ff70c57f6ca72274a9f62961dedb067.tar.xz glibc-eed242a60ff70c57f6ca72274a9f62961dedb067.zip |
(atomic_add): Fix test for using atomic_decrement.
Diffstat (limited to 'sysdeps/i386/i486')
-rw-r--r-- | sysdeps/i386/i486/bits/atomic.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/i386/i486/bits/atomic.h b/sysdeps/i386/i486/bits/atomic.h index cb2fcdb0cc..9587eaa87a 100644 --- a/sysdeps/i386/i486/bits/atomic.h +++ b/sysdeps/i386/i486/bits/atomic.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -169,7 +169,7 @@ typedef uintmax_t uatomic_max_t; #define atomic_add(mem, value) \ (void) ({ if (__builtin_constant_p (value) && (value) == 1) \ atomic_increment (mem); \ - else if (__builtin_constant_p (value) && (value) == 1) \ + else if (__builtin_constant_p (value) && (value) == -1) \ atomic_decrement (mem); \ else if (sizeof (*mem) == 1) \ __asm __volatile (LOCK_PREFIX "addb %b1, %0" \ |