On 28/02/2011 22:48, Ben Noordhuis wrote:
On Mon, Feb 28, 2011 at 18:26, Simone Carusoi...@simonecaruso.com wrote:
I wrote a simple cache inside my module with apr_shm and apr_rmm
Simone, have a look at ap_socache.h and ap_slotmem.h, they're two
simple cache facilities that were added in
Why not check the return status of the lock and unlock calls??
On Feb 28, 2011, at 12:26 PM, Simone Caruso wrote:
Hi all,
I wrote a simple cache inside my module with apr_shm and apr_rmm, but I have
problems with apr mutex...
I have this peace of code:
static apr_global_mutex_t *mtx
a few things to try:
* you should use APR_STATUS_IS_EBUSY(s) instead of ... == APR_EBUSY
* after creating the mutex, you might have to set permissions on it:
#ifdef AP_NEED_SET_MUTEX_PERMS
rc = unixd_set_global_mutex_perms(mutex);
if(rc != APR_SUCCESS) {
ap_log_error(APLOG_MARK,
On 28/02/2011 18:35, Jim Jagielski wrote:
Why not check the return status of the lock and unlock calls??
Ehm... i'm an idiot...
i create the lock in this way:
module_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp,
server_rec *s)
{
lock = ap_server_root_relative(p,
On 28/02/2011 18:53, thomas bonfort wrote:
a few things to try:
* you should use APR_STATUS_IS_EBUSY(s) instead of ... == APR_EBUSY
* after creating the mutex, you might have to set permissions on it:
#ifdef AP_NEED_SET_MUTEX_PERMS
rc = unixd_set_global_mutex_perms(mutex);
if(rc !=
On Mon, Feb 28, 2011 at 18:26, Simone Caruso i...@simonecaruso.com wrote:
I wrote a simple cache inside my module with apr_shm and apr_rmm
Simone, have a look at ap_socache.h and ap_slotmem.h, they're two
simple cache facilities that were added in 2.3.0. Might save you some
work. :)