apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <jwool...@virginia.edu>
Subject Re: [PATCH] fix apr_atomic.h for FreeBSD
Date Sun, 23 Mar 2003 04:52:29 GMT
On Sat, 22 Mar 2003, Craig Rodrigues wrote:

> +#define apr_atomic_set(mem, val)     (*(mem) = val)
>  #define apr_atomic_read(mem)         (*mem)
> +
> +#define APR_OVERRIDE_ATOMIC_DEC 1
> +APR_INLINE int apr_atomic_dec(apr_atomic_t *mem)
> +{
> +    atomic_subtract_int(mem,1);
> +    return *mem;
> +}

In what way are those two implementations guaranteed atomic?  I don't
believe they are at all.

--Cliff

Mime
View raw message