httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: svn commit: r1068066 - /httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c
Date Wed, 09 Feb 2011 12:58:38 GMT

On Feb 9, 2011, at 2:02 AM, Ruediger Pluem wrote:

>> +    (*slot->num_free)--;
> 
> Is this atomic? Don't we need to use the atomic functions from APR here?
> 
> 
>>     return APR_SUCCESS;
>> }
>> 
>> @@ -574,6 +592,7 @@ static apr_status_t slotmem_release(ap_s
>>         return APR_NOTFOUND;
>>     }
>>     inuse[id] = 0;
>> +    (*slot->num_free)++;
> 
> Is this atomic? Don't we need to use the atomic functions from APR here?
> 

It's not atomic, but the grab/release functions aren't either
unless mutexed.

There was some discussion long ago about whether or not slotmem itself
should automatically mutex on things that should be atomic
or whether it should be left up to the user... it was decided the
latter made more sense.


Mime
View raw message