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
