apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w..@netscape.com (Wan-Teh Chang)
Subject Re: [PATCH] fix apr_atomic.h for FreeBSD
Date Sun, 23 Mar 2003 06:34:24 GMT
It seems that apr_atomic_dec should be defined as
     return !atomic_dec_and_test(mem);

> The Netware implementation of apr_atomic_dec() is similar to what
> I did for FreeBSD:
> 
> 194 inline int apr_atomic_dec(apr_atomic_t *mem)
> 195 {
> 196     atomic_dec(mem);
> 197     return *mem;
> 198 }

This implementation is not atomic.

Wan-Teh


Mime
View raw message