apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mladen Turk" <mt...@mappingsoft.com>
Subject RE: [PROPOSAL] apr_shm_t, a new shared memory API to replace old
Date Tue, 08 Jan 2002 08:25:02 GMT

> -----Original Message-----
> From: Aaron Bannert [mailto:aaron@clove.org] 
> Sent: Monday, January 07, 2002 7:31 PM
> To: dev@apr.apache.org
> Subject: [PROPOSAL] apr_shm_t, a new shared memory API to replace old
> 
> 
> The current API (apr_shmem_t) has some undesirable features 
> that make it difficult or impossible to port to all 
> platforms. The following is a replacement API with some 
> interesting features of its own. Here are the highlights:
> APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
>                                          apr_size_t reqsize,
>                                          const char *file,
>                                          apr_pool_t *pool);
> APR_DECLARE(apr_status_t) apr_shm_attach(apr_shm_t **m,
>                                          const char *file,
>                                          apr_pool_t *pool);
> 

Could we add here an extra param to those functions that could be used
as crossproccess lock names?

The reason for that would be to allow the multiple anonymous memory
segments to exists without conflicting, and the ability to have more
then one application using apr to be the 'shmem owner' on the same
machine (like running multiple Apache instances). On the other hand
simply using NULL as the name parameter would put the things to behave
like they are right now. So something like:

APR_DECLARE(apr_status_t) apr_shm_create(apr_shm_t **m,
                                         apr_size_t reqsize,
                                         const char *file,
                                         const char *name,
                                         apr_pool_t *pool);
APR_DECLARE(apr_status_t) apr_shm_attach(apr_shm_t **m,
                                         const char *file,
                                         const char *name,
                                         apr_pool_t *pool);

MT.


Mime
View raw message