diff options
author | bnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68> | 2002-02-20 20:00:28 +0000 |
---|---|---|
committer | bnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68> | 2002-02-20 20:00:28 +0000 |
commit | 8b7aee448080a3243d05ef7020d855164976dc6e (patch) | |
tree | 4ba3a3c4b64bbae75dbed7160c6329c6c9d53c43 /include | |
parent | 761f48b0f90ace7d345a7e68f652d336026a63a2 (diff) | |
download | libapr-8b7aee448080a3243d05ef7020d855164976dc6e.tar.gz |
NetWare implementation of the APR atomic APIs
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63034 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r-- | include/apr_atomic.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/apr_atomic.h b/include/apr_atomic.h index 5f726b6c3..ec8404840 100644 --- a/include/apr_atomic.h +++ b/include/apr_atomic.h @@ -163,6 +163,23 @@ apr_uint32_t apr_atomic_cas(volatile apr_uint32_t *mem,long with,long cmp); #define APR_ATOMIC_NEED_CAS_DEFAULT 1 #endif +#elif defined(NETWARE) + +#include <stdlib.h> +#define apr_atomic_t apr_uint32_t + +#define apr_atomic_add(mem, val) atomic_add(mem,val) +#define apr_atomic_dec(mem) atomic_dec(mem) +#define apr_atomic_inc(mem) atomic_inc(mem) +#define apr_atomic_set(mem, val) (*mem = val) +#define apr_atomic_read(mem) (*mem) +#if defined(cmpxchg) +#define apr_atomic_init(pool) APR_SUCCESS +#define apr_atomic_cas(mem,with,cmp) cmpxchg(mem,cmp,with) +#else +#define APR_ATOMIC_NEED_CAS_DEFAULT 1 +#endif + #elif defined(__FreeBSD__) && (__FreeBSD__ >= 4) #include <machine/atomic.h> |