apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <brian.p...@cnet.com>
Subject request for comments: new atomic API
Date Sat, 13 Sep 2003 05:46:51 GMT
The current apr_atomic API has a couple of limitations:
* The size of apr_atomic_t varies among platforms, which
  makes it hard to guarantee portability of applications
  that use this type to store large values.
  
* The arithmetic functions use apr_atomic_t, while the
  compare-and-swap function uses a mix of apr_uint32_t
  and long int.  Thus it's impossible to portably write
  code that uses, say, apr_atomic_dec() and apr_atomic_cas()
  on the same variable.

This patch presents a proposed new API in which the
atomic functions explicitly operate on 32-bit ints.

I'd like to add commit this new API (plus an implementation)
next week.  But if anyone has objections or suggested changes,
please let me know...

Thanks,
Brian


Mime
View raw message