Boost logo

Boost :

From: Miro Jurisic (macdev_at_[hidden])
Date: 2005-04-07 15:48:01


In article <4255969D.925F93C4_at_[hidden]>, Alexander Terekhov <terekhov_at_[hidden]>
wrote:

> Miro Jurisic wrote:
> [...]
> > > We should use Apple's atomic_decrement_weak(), atomic_decrement_strong(),
> > > atomic_decrement_strong(), atomic_increment_naked(), and
> ^^^^^^^^^^^^^^^^^^^^^^^^^
>
> atomic_fetch_naked().
>
> > > atomic_increment_naked_if_not_zero().
> > >
> > > Drop me a link to Apple's man page for that stuff ASAP, please.
> >
> > Sorry, I don't know what you are talking about. Not only do I not see such
> > APIs
> > on Mac OS, google also doesn't reveal such APIs anywhere else.
>
> Try Google Canada or Germany.
>
> http://groups.google.ca/groups?q=atomic_decrement_weak
> http://groups.google.de/groups?q=atomic_decrement_weak
>
> They both seem to work fine. (US population is currently being
> tortured by "groups-beta" at google.com. ;-) )

In that case, read
<http://developer.apple.com/documentation/Darwin/Reference/KernellibkernFramework
/OSAtomic/> and tell me if it answers your questions.

As I mention elsewhere in the thread, Apple's documentation is flawed on this
matter: they document kernel calls (e.g., OSIncrementAtomic) better than the
userland calls (e.g., IncrementAtomic), but this issue will be addressed in the
future, and it's safe to assume that the behavior of the userland call (which I
believe we should use) is the same as the documented behavior of its kernel
counterpart (whose documentation I referred you to above).

meeroh


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk