Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 73747 invoked from network); 18 Oct 2007 12:17:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Oct 2007 12:17:34 -0000 Received: (qmail 37461 invoked by uid 500); 18 Oct 2007 12:17:22 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 37350 invoked by uid 500); 18 Oct 2007 12:17:21 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 37339 invoked by uid 99); 18 Oct 2007 12:17:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Oct 2007 05:17:21 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Oct 2007 12:17:33 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 607EF1A983A; Thu, 18 Oct 2007 05:17:13 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r585937 - in /apr/apr/branches/1.2.x: CHANGES atomic/os390/atomic.c Date: Thu, 18 Oct 2007 12:17:13 -0000 To: commits@apr.apache.org From: trawick@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071018121713.607EF1A983A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: trawick Date: Thu Oct 18 05:17:12 2007 New Revision: 585937 URL: http://svn.apache.org/viewvc?rev=585937&view=rev Log: merge r585935 from trunk Implement apr_atomic_casptr() for z/OS. Submitted by: David Jones Reviewed by: trawick Modified: apr/apr/branches/1.2.x/CHANGES apr/apr/branches/1.2.x/atomic/os390/atomic.c Modified: apr/apr/branches/1.2.x/CHANGES URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/CHANGES?rev=585937&r1=585936&r2=585937&view=diff ============================================================================== --- apr/apr/branches/1.2.x/CHANGES [utf-8] (original) +++ apr/apr/branches/1.2.x/CHANGES [utf-8] Thu Oct 18 05:17:12 2007 @@ -1,6 +1,9 @@  -*- coding: utf-8 -*- Changes for APR 1.2.12 + *) Implement apr_atomic_casptr() for z/OS. + [David Jones ] + *) Fill in apr_fileinfo_t member st_csize on Netware and Unix (PR 41678), and refine the file times down to apr_time_t resolution if supported by a st_atimensec or st_atim.tv_nsec value by the OS. Additional Modified: apr/apr/branches/1.2.x/atomic/os390/atomic.c URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/atomic/os390/atomic.c?rev=585937&r1=585936&r2=585937&view=diff ============================================================================== --- apr/apr/branches/1.2.x/atomic/os390/atomic.c (original) +++ apr/apr/branches/1.2.x/atomic/os390/atomic.c Thu Oct 18 05:17:12 2007 @@ -82,6 +82,30 @@ return old; /* old is automatically updated from mem on cs failure */ } +#if APR_SIZEOF_VOIDP == 4 +void *apr_atomic_casptr(volatile void **mem_ptr, + void *swap_ptr, + const void *cmp_ptr) +{ + __cs1(&cmp_ptr, /* automatically updated from mem on __cs1 failure */ + mem_ptr, /* set from swap when __cs1 succeeds */ + &swap_ptr); + return (void *)cmp_ptr; +} +#elif APR_SIZEOF_VOIDP == 8 +void *apr_atomic_casptr(volatile void **mem_ptr, + void *swap_ptr, + const void *cmp_ptr) +{ + __csg(&cmp_ptr, /* automatically updated from mem on __csg failure */ + mem_ptr, /* set from swap when __csg succeeds */ + &swap_ptr); + return (void *)cmp_ptr; +} +#else +#error APR_SIZEOF_VOIDP value not supported +#endif /* APR_SIZEOF_VOIDP */ + apr_uint32_t apr_atomic_xchg32(volatile apr_uint32_t *mem, apr_uint32_t val) { apr_uint32_t old, new_val;