On 02/07/2011 08:25 PM, [email protected] wrote:
> Author: jim
> Date: Mon Feb  7 19:25:14 2011
> New Revision: 1068066
> 
> URL: http://svn.apache.org/viewvc?rev=1068066&view=rev
> Log:
> OK, use faster, shared version... makes sense to persist this
> info since it is aligned with the actual data itself.
> 
> Modified:
>     httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c
> 
> Modified: httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c
> URL: 
> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c?rev=1068066&r1=1068065&r2=1068066&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c (original)
> +++ httpd/httpd/trunk/modules/slotmem/mod_slotmem_shm.c Mon Feb  7 19:25:14 
> 2011

> @@ -556,6 +573,7 @@ static apr_status_t slotmem_grab(ap_slot
>      }
>      *inuse = 1;
>      *id = i;
> +    (*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?

>      return APR_SUCCESS;
>  }
>  
> 
> 
> 
> 

Reply via email to