apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig Rodrigues <rodr...@attbi.com>
Subject Re: [PATCH] fix apr_atomic.h for FreeBSD
Date Sun, 23 Mar 2003 06:50:26 GMT
On Sat, Mar 22, 2003 at 10:34:24PM -0800, Wan-Teh Chang wrote:
> It seems that apr_atomic_dec should be defined as
>     return !atomic_dec_and_test(mem);
              ^^^^^^^^^^^^^^^^^^^

Did you invent that macro?  I can't find it in FreeBSD.



> >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.


But it exists in the APR codebase, and is apparently acceptable
to Netware people.

-- 
Craig Rodrigues        
http://home.attbi.com/~rodrigc
rodrigc@attbi.com

Mime
View raw message