httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Bannert <aa...@clove.org>
Subject Re: Interprocess read/write locks
Date Thu, 08 Feb 2007 16:03:51 GMT
If you don't care about portability, pthread_rwlocks stored in shmem
should work fine. The reason we didn't implement a cross-process
rwlock in APR is because we couldn't guarantee a proper implementation
(at the time) on all supported platforms.

-aaron


On Mon, Feb 05, 2007 at 03:44:16PM +0000, Christiaan Lamprecht wrote:
> Last Nov 22 I asked a question about writable shared memory,
> everything's working now so thanks!
> 
> Locking the shared memory is turning out to be quite costly. I have
> many shared-memory readers and only a few writers so using a rwlock
> seems appropriate but APR provides only apr_thread_rwlock routines.
> 
> Is there a way to use rwlocks between processes rather than threads?
> Maybe using the standard POSIX pthread_rwlock routines (storing the
> lock in the shm space...)?
> 
> Many thanks again
> Christiaan
> 
> PS:
> Apache 2 on Linux
> apr_shm (for shared memory)
> prefork MPM (it's non threaded!)
> 

Mime
View raw message