Boost logo

Boost :

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


In article <00b601c53ba9$8b562e80$6501a8c0_at_pdimov2>,
 "Peter Dimov" <pdimov_at_[hidden]> wrote:

> Peter Dimov wrote:
>
> > There are other examples in Apple's own code, but opensource.apple.com
> > wants me to register to see them. ;-)
>
> But apparently they didn't ask googlebot to register:
>
> http://64.233.183.104/search?q=cache:CBs4claC9QsJ:www.opensource.apple.com/dar
> winsource/Current/xnu-517.3.7/libkern/ppc/OSAtomic.s
>
> http://64.233.183.104/search?q=cache:9VZ6d3qK-hAJ:www.opensource.apple.com/dar
> winsource/10.3.2/xnu-517.3.7/osfmk/ppc/hw_lock.s
>
> And another non-Apple example:
>
> http://www.opensource.apple.com/darwinsource/7.0b1/samba/samba/source/tdb/spin
> lock.c
>
> No CPU-specific hacks anywhere; just straightforward lwarx/stwcx. use.

The answer I got from Apple about your question says:

1. Yes, the documentation for the userland calls is missing specification about
memory synchronization behavior in the current version of the developer tools
2. The documentation for the corresponding kernel calls is at
<http://developer.apple.com/documentation/Darwin/Reference/KernellibkernFramework
/OSAtomic/> and includes memory synchronization behavior
3. It is safe to assume that the userland call Foo has the same behavior as the
kernel call OSFoo for the purpose of this discussion. (This API discrepancy will
be addressed in the future.)

If the documentation referenced here does not adequately answer your question,
please let me know and I will follow up with Apple.

Finally, I understand what you are saying regarding the fact that current
Apple's code is what you expect it to be, but my point about Apple having more
resources to keep this code up-to-date with emerging hardware still stands, and
therefore I still think that we should use Apple's APIs. (And the engineers I
talked to agree with me.)

meeroh


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