From eaab02615c49b68ed0280b65f158fd80d60babbf Mon Sep 17 00:00:00 2001 From: wtc Date: Tue, 2 Jun 1998 03:25:22 +0000 Subject: [PATCH] Moved the definition of _AIX_AtomicSet() to the outside of the #ifndef AIX4_1 block. Thanks to C. Fung for reporting this problem. git-svn-id: svn://10.0.0.236/trunk@2910 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/nsprpub/pr/src/md/unix/aix.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/mozilla/nsprpub/pr/src/md/unix/aix.c b/mozilla/nsprpub/pr/src/md/unix/aix.c index 544b2584cdc..879c6adcd83 100644 --- a/mozilla/nsprpub/pr/src/md/unix/aix.c +++ b/mozilla/nsprpub/pr/src/md/unix/aix.c @@ -26,7 +26,6 @@ #ifndef AIX4_1 -#include #include #include #include @@ -35,18 +34,6 @@ static void *aix_handle = NULL; static int (*aix_select_fcn)() = NULL; static int (*aix_poll_fcn)() = NULL; -PRInt32 _AIX_AtomicSet(PRInt32 *val, PRInt32 newval) -{ - PRIntn oldval; - boolean_t stored; - oldval = fetch_and_add((atomic_p)val, 0); - do - { - stored = compare_and_swap((atomic_p)val, &oldval, newval); - } while (!stored); - return oldval; -} /* _AIX_AtomicSet */ - int _MD_SELECT(int width, fd_set *r, fd_set *w, fd_set *e, struct timeval *t) { int rv; @@ -106,6 +93,20 @@ void _pr_aix_dummy() #endif /* !AIX4_1 */ +#include + +PRInt32 _AIX_AtomicSet(PRInt32 *val, PRInt32 newval) +{ + PRIntn oldval; + boolean_t stored; + oldval = fetch_and_add((atomic_p)val, 0); + do + { + stored = compare_and_swap((atomic_p)val, &oldval, newval); + } while (!stored); + return oldval; +} /* _AIX_AtomicSet */ + #if !defined(PTHREADS_USER) #ifdef _PR_PTHREADS