apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Ferris <bdfer...@cs.washington.edu>
Subject apr_thread_rwlock + PTHREAD_RWLOCK_INITIALIZER + Mac OS X
Date Sun, 20 Feb 2005 22:58:16 GMT
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


Mime
View raw message