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 15:28:14 GMT
On Sun, Mar 23, 2003 at 01:45:40AM -0500, Cliff Woolley wrote:
> On Sun, 23 Mar 2003, Craig Rodrigues wrote:
> 
> > But it exists in the APR codebase,
> 
> I don't count that as making it necessarily correct.  :)  But even if it
> is correct on Netware, that doesn't make it correct on FreeBSD.  And I'm
> pretty sure it's not.

It probably is not.  However, I don't see how to preserve the existing
interface:

/**
 * decrement the atomic variable by 1
 * @param mem pointer to the atomic value
 * @return zero if the value is zero, otherwise non-zero
 */
int apr_atomic_dec(volatile apr_atomic_t *mem);


and remain atomic on FreeBSD.  FreeBSD does not have the macro
atomic_dec_and_test() macro, which apparently exists on Linux.

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

Mime
View raw message