diff options
author | Mark Mitchell <mark@codesourcery.com> | 2001-01-24 19:19:26 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2001-01-24 19:19:26 +0000 |
commit | c347e89206c3ab7c8273182339c061a2d849ed23 (patch) | |
tree | 8a87b629a0e3a4ef9cd4df4d8d08253ed6798a00 | |
parent | 4cfc604201d08c88f367657652cabbcf9203b298 (diff) | |
download | gcc-c347e89206c3ab7c8273182339c061a2d849ed23.zip gcc-c347e89206c3ab7c8273182339c061a2d849ed23.tar.gz gcc-c347e89206c3ab7c8273182339c061a2d849ed23.tar.bz2 |
atomicity.h (__compare_and_swap): Remove.
* config/os/aix/bits/atomicity.h (__compare_and_swap): Remove.
(__always_swap): Likewise.
From-SVN: r39243
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/config/os/aix/bits/atomicity.h | 41 |
2 files changed, 14 insertions, 32 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index e962f27..fdd1cff 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2001-01-24 Mark Mitchell <mark@codesourcery.com> + + * config/os/aix/bits/atomicity.h (__compare_and_swap): Remove. + (__always_swap): Likewise. + 2001-01-23 Chris Demetriou <cgd@broadcom.com> * libsupc++/exception_support.cc (__terminate_func): Remove diff --git a/libstdc++-v3/config/os/aix/bits/atomicity.h b/libstdc++-v3/config/os/aix/bits/atomicity.h index 1448180..fa8350a 100644 --- a/libstdc++-v3/config/os/aix/bits/atomicity.h +++ b/libstdc++-v3/config/os/aix/bits/atomicity.h @@ -1,5 +1,5 @@ /* Low-level functions for atomic operations. AIX version. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,7 +20,14 @@ #ifndef _BITS_ATOMICITY_H #define _BITS_ATOMICITY_H 1 -/* Should this be type long so 64-bit word in 64-bit mode? */ +/* We cannot use the cpu/powerpc/bits/atomicity.h inline assembly + definitions for these operations since they depend on operations + that are not available on the original POWER architecture. AIX + still runs on the POWER architecture, so it would be incorrect to + assume the existence of these instructions. */ + +/* This should match the type pointed to by atomic_p in + <sys/atomic_op.h>. */ typedef int _Atomic_word; #include <sys/atomic_op.h> @@ -39,34 +46,4 @@ __atomic_add (atomic_p __mem, int __val) (void) fetch_and_add (__mem, __val); } -static inline int -__attribute__ ((unused)) -__compare_and_swap (atomic_l __p, long int __oldval, long int __newval) -{ - return compare_and_swaplp (__p, &__oldval, __newval); -} - -static inline long -__attribute__ ((unused)) -__always_swap (atomic_l __p, long int __newval) -{ - long __val = *__p; - - while (! compare_and_swaplp (__p, &__val, __newval)) - /* EMPTY */; - - return __val; -} - -static inline int -__attribute__ ((unused)) -__test_and_set (atomic_l __p, long int __newval) -{ - long __val = 0; - - (void) compare_and_swaplp (__p, &__val, __newval); - - return __val; -} - #endif /* atomicity.h */ |