You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Brian Ferris <bd...@cs.washington.edu> on 2005/02/20 23:58:16 UTC
apr_thread_rwlock + PTHREAD_RWLOCK_INITIALIZER + Mac OS X
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
Re: apr_thread_rwlock + PTHREAD_RWLOCK_INITIALIZER + Mac OS X
Posted by Jeff Trawick <tr...@gmail.com>.
On Mon, 7 Mar 2005 08:20:54 -0800, Aaron Bannert <aa...@clove.org> wrote:
> Actually I already committed it to the main trunk, so the next release
> based on the trunk should have the fix. I haven't back-ported, but
> I plan to since I'm guessing that this functionality will be desired in
> older versions of APR as well.
I put your fix in 0.9.x a couple of weeks ago. It isn't in the 1.0.x
branch AFAICT.
Re: apr_thread_rwlock + PTHREAD_RWLOCK_INITIALIZER + Mac OS X
Posted by Aaron Bannert <aa...@clove.org>.
Actually I already committed it to the main trunk, so the next release
based on the trunk should have the fix. I haven't back-ported, but
I plan to since I'm guessing that this functionality will be desired in
older versions of APR as well.
-aaron
On Feb 20, 2005, at 3:00 PM, Jeff Trawick wrote:
> On Sun, 20 Feb 2005 14:58:16 -0800, Brian Ferris
> <bd...@cs.washington.edu> wrote:
>> I've been developing with the APR on Mac OS X 10.3.8, and I'm
> ...
>> The PTHREAD_RWLOCK_INITIALIZER macro is missing, which prevents the
>> unix rwlock implementation from kicking in. Changing it to something
>> like:
>
> Aaron Bannert posted a patch to fix this a couple of weeks ago but he
> hasn't committed it yet. Subsequent releases should have that problem
> resolved.
>
Re: apr_thread_rwlock + PTHREAD_RWLOCK_INITIALIZER + Mac OS X
Posted by Jeff Trawick <tr...@gmail.com>.
On Sun, 20 Feb 2005 14:58:16 -0800, Brian Ferris
<bd...@cs.washington.edu> wrote:
> I've been developing with the APR on Mac OS X 10.3.8, and I'm
...
> The PTHREAD_RWLOCK_INITIALIZER macro is missing, which prevents the
> unix rwlock implementation from kicking in. Changing it to something
> like:
Aaron Bannert posted a patch to fix this a couple of weeks ago but he
hasn't committed it yet. Subsequent releases should have that problem
resolved.