apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <n...@webthing.com>
Subject Re: Info about APR threads
Date Wed, 21 Dec 2005 11:59:38 GMT
On Wednesday 21 December 2005 11:09, Richard wrote:

> Now APR pools greatly complicate my situation. If I undestand correctly,
> apr_thread_mutex_create() needs a pool and the actual mutex will be
> allocated from that pool.

Yep.

> The location of that pool in memory will not be 
> shared among my processes.

Erm, threads or processes?  If the former, that's moot.  If the latter,
you would want an APR global mutex.

> So is that a limitation of APR mutexes ? APR 
> mutexes cannot be shared among processes ? Is there a way to get around
> that ? Is there a hack that could be done by using a special memory
> allocator for that pool ?

That's why there are three different types of mutex in APR.

> So maybe I should give some background on what I am working on. I am
> working with Apache, mod_ssl and openssl. Apache is running with the worker
> MPM. I have modified Apache so that the apache processes share a
> shared-memory buffer (basically setup through a syscall similar to mmap
> shared).

The conventional Apache way to do that would be with apr_shm.

> I have a special SSL engine that takes care of cerficate 
> signatures. Each apache thread servicing an SSL connection queues the
> signature request in the shared buffer which is processed by an outside
> application responsible for encryption. So I need a way to synchronize the
> various threads inside each apache process.

Sounds like the critical point is how you communicate with the external 
application.  Can that be fixed to support asynchronous access?

-- 
Nick Kew

Mime
View raw message