summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc <devnull@localhost>1998-06-02 03:25:22 +0000
committerwtc <devnull@localhost>1998-06-02 03:25:22 +0000
commit7757d0c2020152b5d2a10020da897ad8f1e8fb00 (patch)
treef9f761a4c255cd3557d75cf37b6e3fed3d51d07a
parentdde43836a02caeeceb76bf78570e0bfaa6fe2e3f (diff)
downloadnspr-hg-7757d0c2020152b5d2a10020da897ad8f1e8fb00.tar.gz
Moved the definition of _AIX_AtomicSet() to the outside of the
#ifndef AIX4_1 block. Thanks to C. Fung <carsonf@torolab.ibm.com> for reporting this problem.
-rw-r--r--pr/src/md/unix/aix.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/pr/src/md/unix/aix.c b/pr/src/md/unix/aix.c
index 544b2584..879c6adc 100644
--- a/pr/src/md/unix/aix.c
+++ b/pr/src/md/unix/aix.c
@@ -26,7 +26,6 @@
#ifndef AIX4_1
-#include <sys/atomic_op.h>
#include <sys/select.h>
#include <sys/poll.h>
#include <dlfcn.h>
@@ -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 <sys/atomic_op.h>
+
+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