Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 19685 invoked from network); 20 Feb 2005 22:55:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 20 Feb 2005 22:55:35 -0000 Received: (qmail 69761 invoked by uid 500); 20 Feb 2005 22:55:35 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 69728 invoked by uid 500); 20 Feb 2005 22:55:34 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 69712 invoked by uid 99); 20 Feb 2005 22:55:34 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from ward.cs.washington.edu (HELO ward.cs.washington.edu) (128.95.1.7) by apache.org (qpsmtpd/0.28) with ESMTP; Sun, 20 Feb 2005 14:55:33 -0800 Received: from [192.168.1.2] (c-24-19-252-29.client.comcast.net [24.19.252.29]) (authenticated bits=0) by ward.cs.washington.edu (8.13.0/8.12.7/1.2+) with ESMTP id j1KMtSHR048180 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Sun, 20 Feb 2005 14:55:29 -0800 (PST) (envelope-from bdferris@cs.washington.edu) Mime-Version: 1.0 (Apple Message framework v619.2) Content-Transfer-Encoding: 7bit Message-Id: <4ee1d4ecb3cd00e40d30cc6981e4558e@cs.washington.edu> Content-Type: text/plain; charset=US-ASCII; format=flowed To: dev@apr.apache.org From: Brian Ferris Subject: apr_thread_rwlock + PTHREAD_RWLOCK_INITIALIZER + Mac OS X Date: Sun, 20 Feb 2005 14:58:16 -0800 X-Mailer: Apple Mail (2.619.2) X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I've been developing with the APR on Mac OS X 10.3.8, and I'm specifically looking at the apr_thread_rwlock functionality. It's my understanding that Mac OS X has not supported rwlocks in the past, but that may have changed. There is mention Specifically, my experiments with pthread_rwlock methods suggest the functionality is working. However, rwlock support fails to build in apr-1.1.0 because of the following check in the configure script: [pthread_rwlock_t rwlock=PTHREAD_RWLOCK_INITIALIZER;] The PTHREAD_RWLOCK_INITIALIZER macro is missing, which prevents the unix rwlock implementation from kicking in. Changing it to something like: [pthread_rwlock_t rwlock; pthread_rwlock_init( &rwlock, NULL);] does the trick and more closely mirrors the code in locks/unix/thread_rwlock.c Additionally, all the test-cases for rwlock's pass on Mac OS X 10.3.8 for me. Any thoughts on this issue? I apologize if this is not the appropriate venue. I'm new to the list and I was not able to find any archives to see if this issue had been discussed before. Thanks, Brian Ferris