Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 132284382 for ; Sat, 25 Jun 2011 11:38:35 +0000 (UTC) Received: (qmail 46585 invoked by uid 500); 25 Jun 2011 11:38:34 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 46287 invoked by uid 500); 25 Jun 2011 11:38:33 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 46280 invoked by uid 99); 25 Jun 2011 11:38:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Jun 2011 11:38:33 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Jun 2011 11:38:31 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 46CFD23889D5 for ; Sat, 25 Jun 2011 11:38:10 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@commons.apache.org From: mturk@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110625113810.46CFD23889D5@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 */