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.
