commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r1139525 - in /commons/sandbox/runtime/trunk/src/main/native: Makefile.unx.in os/bsdx/atomic.c os/linux/atomic.c os/unix/atomic.c
Date Sat, 25 Jun 2011 11:38:10 GMT
Author: mturk
Date: Sat Jun 25 11:38:09 2011
New Revision: 1139525

URL: http://svn.apache.org/viewvc?rev=1139525&view=rev
Log:
Use common unix atomics for gcc

Added:
    commons/sandbox/runtime/trunk/src/main/native/os/unix/atomic.c
      - copied, changed from r1139498, commons/sandbox/runtime/trunk/src/main/native/os/linux/atomic.c
Removed:
    commons/sandbox/runtime/trunk/src/main/native/os/bsdx/atomic.c
    commons/sandbox/runtime/trunk/src/main/native/os/linux/atomic.c
Modified:
    commons/sandbox/runtime/trunk/src/main/native/Makefile.unx.in

Modified: commons/sandbox/runtime/trunk/src/main/native/Makefile.unx.in
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/Makefile.unx.in?rev=1139525&r1=1139524&r2=1139525&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/Makefile.unx.in (original)
+++ commons/sandbox/runtime/trunk/src/main/native/Makefile.unx.in Sat Jun 25 11:38:09 2011
@@ -78,18 +78,18 @@ UNIX_SOURCES=\
 	$(TOPDIR)/os/unix/util.c
 
 BSDX_SOURCES=\
-	$(TOPDIR)/os/bsdx/atomic.c \
-	$(TOPDIR)/os/bsdx/os.c
+	$(TOPDIR)/os/bsdx/os.c \
+	$(TOPDIR)/os/unix/atomic.c
 DARWIN_SOURCES=\
-	$(TOPDIR)/os/bsdx/atomic.c \
-	$(TOPDIR)/os/darwin/os.c
+	$(TOPDIR)/os/darwin/os.c \
+	$(TOPDIR)/os/unix/atomic.c
 HPUX_SOURCES=\
 	$(TOPDIR)/os/hpux/os.c
 LINUX_SOURCES=\
-	$(TOPDIR)/os/linux/atomic.c \
 	$(TOPDIR)/os/linux/epoll.c \
 	$(TOPDIR)/os/linux/misc.c \
-	$(TOPDIR)/os/linux/os.c
+	$(TOPDIR)/os/linux/os.c \
+	$(TOPDIR)/os/unix/atomic.c
 SOLARIS_SOURCES=\
 	$(TOPDIR)/os/solaris/atomic.c \
 	$(TOPDIR)/os/solaris/os.c

Copied: commons/sandbox/runtime/trunk/src/main/native/os/unix/atomic.c (from r1139498, commons/sandbox/runtime/trunk/src/main/native/os/linux/atomic.c)
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/atomic.c?p2=commons/sandbox/runtime/trunk/src/main/native/os/unix/atomic.c&p1=commons/sandbox/runtime/trunk/src/main/native/os/linux/atomic.c&r1=1139498&r2=1139525&rev=1139525&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/linux/atomic.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/atomic.c Sat Jun 25 11:38:09 2011
@@ -21,6 +21,7 @@
 #if USE_ATOMICS_WRAPPER
 UNUSED_SOURCE_FILE(atomic);
 #else
+# if defined(__GNUC__)
 void  AcrCpuFence()
 {
     _PR_COMPILER_FENCE();
@@ -113,5 +114,7 @@ int AcrAtomic32Equ(volatile acr_atomic32
     return *val == (acr_atomic32_t)num;
 #endif
 }
-
+# else /* !__GNUC__ */
+#  error "Atomics are not implemented for this platform!"
+# endif
 #endif /* USE_ATOMICS_WRAPPER */



Mime
View raw message