You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by je...@apache.org on 2002/05/01 01:43:29 UTC
cvs commit: apr/include apr_atomic.h
jerenkrantz 02/04/30 16:43:28
Modified: include apr_atomic.h
Log:
Remove Linux atomic support as this is most definitely not meant for
userspace applications. We will have to come up with processor-specific
implementations, but we can not rely on Linux to help us here. So,
remove this.
Linux will now use the fallback atomic implementation.
Revision Changes Path
1.24 +0 -19 apr/include/apr_atomic.h
Index: apr_atomic.h
===================================================================
RCS file: /home/cvs/apr/include/apr_atomic.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- apr_atomic.h 20 Apr 2002 22:06:38 -0000 1.23
+++ apr_atomic.h 30 Apr 2002 23:43:28 -0000 1.24
@@ -154,25 +154,6 @@
#define apr_atomic_cas(mem,with,cmp) InterlockedCompareExchange(mem,with,cmp)
#define apr_atomic_init(pool) APR_SUCCESS
-#elif defined(__linux)
-
-#include <stdlib.h>
-#include <asm/atomic.h>
-#include <asm/system.h>
-#define apr_atomic_t atomic_t
-
-#define apr_atomic_add(mem, val) atomic_add(val,mem)
-#define apr_atomic_dec(mem) !atomic_dec_and_test(mem)
-#define apr_atomic_inc(mem) atomic_inc(mem)
-#define apr_atomic_set(mem, val) atomic_set(mem, val)
-#define apr_atomic_read(mem) atomic_read(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(NETWARE)
#include <stdlib.h>
Re: cvs commit: apr/include apr_atomic.h
Posted by Jeff Trawick <tr...@attglobal.net>.
Joe Orton <jo...@manyfish.co.uk> writes:
> On Tue, Apr 30, 2002 at 11:43:29PM -0000, Justin Erenkrantz wrote:
> > Modified: include apr_atomic.h
> > Log:
> > Remove Linux atomic support as this is most definitely not meant for
> > userspace applications. We will have to come up with processor-specific
> > implementations, but we can not rely on Linux to help us here. So,
> > remove this.
>
> Great, thanks. There is a stale comment at line 96 which could probably
> be deleted, and also this one:
Thanks, committed!
--
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...
Re: cvs commit: apr/include apr_atomic.h
Posted by Joe Orton <jo...@manyfish.co.uk>.
On Tue, Apr 30, 2002 at 11:43:29PM -0000, Justin Erenkrantz wrote:
> Modified: include apr_atomic.h
> Log:
> Remove Linux atomic support as this is most definitely not meant for
> userspace applications. We will have to come up with processor-specific
> implementations, but we can not rely on Linux to help us here. So,
> remove this.
Great, thanks. There is a stale comment at line 96 which could probably
be deleted, and also this one:
--- apr_atomic.h 30 Apr 2002 23:45:27 -0000 1.25
+++ apr_atomic.h 1 May 2002 08:23:21 -0000
@@ -228,7 +228,7 @@
#define APR_ATOMIC_NEED_CAS_DEFAULT 1
#endif /* APR_HAS_THREADS */
-#endif /* !defined(WIN32) && !defined(__linux) */
+#endif /* !defined(WIN32) */
#if defined(APR_ATOMIC_NEED_DEFAULT)
#define apr_atomic_t apr_uint32_t