site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=1Yujcns0qKody4F6wR13UTZgpLki1IUS+AGYjz94ueE=; b=hH9MyBw2R5V/PV/2PSnzO7cETPORbm3J3jN8gyKjmbtk6UFi+qaro5bW6izSzJCvcxISbFpOoIlsQc1UJ0qfnsDhZQKysPvE3TwLj7w/c3JF6NzXrZFn7fkdi9lWfU9AhlYitKPUN02VbhPMwRO8nqLTvoJlcv8i4sHJ7FogOOU= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=GUlpqkhaSuIOd1OJiBwPCRa/G2QAqlJ3qXjo6yLGKhN0T4fzZURo5QmgGZcEvY82RmGyEWBCdMeePE3SQMCBmR55tY53oZc2hylBzBofYjj/zMqqEwCZXmwOB8lk2YlZwJs4S/CbdzFhMXuDzgbNQpKmj/5CyUR/RFFmdjaxpX4= On Tue, Apr 29, 2008 at 8:18 AM, Shawn Erickson <shawnce@gmail.com> wrote:
On Tue, Apr 29, 2008 at 8:11 AM, Army Research Lab <ckaran@arl.army.mil> wrote:
I want to be able to use this from user space. Are there any functions that are supported from user space and capable of all that the OSAtomic* functions are?
If you are interested in support 10.4 and later then yes. Review...
<http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/atomic.3.html> <http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/spinlock.3.html>
As a note about how to explore things (man pages state libc is the library that provides these)... Note this is on a Leopard (10.5) system. [0:588] > nm -arch i386 /usr/lib/libc.dylib | grep OS 0000af00 T _OSAtomicAdd32 0000af00 T _OSAtomicAdd32Barrier 0000af14 T _OSAtomicAdd64 0000af14 T _OSAtomicAdd64Barrier 0000ae2c T _OSAtomicAnd32 0000ae2c T _OSAtomicAnd32Barrier 0000ae74 T _OSAtomicAnd32Orig 0000ae74 T _OSAtomicAnd32OrigBarrier 0000aebc T _OSAtomicCompareAndSwap32 0000aebc T _OSAtomicCompareAndSwap32Barrier 0000aed8 T _OSAtomicCompareAndSwap64 0000aed8 T _OSAtomicCompareAndSwap64Barrier 0000aebc T _OSAtomicCompareAndSwapInt 0000aebc T _OSAtomicCompareAndSwapIntBarrier 0000aebc T _OSAtomicCompareAndSwapLong 0000aebc T _OSAtomicCompareAndSwapLongBarrier 0000aebc T _OSAtomicCompareAndSwapPtr 0000aebc T _OSAtomicCompareAndSwapPtrBarrier 0000afcc T _OSAtomicDequeue 0000afa8 T _OSAtomicEnqueue 0000ae44 T _OSAtomicOr32 0000ae44 T _OSAtomicOr32Barrier 0000ae8c T _OSAtomicOr32Orig 0000ae8c T _OSAtomicOr32OrigBarrier 0000af60 T _OSAtomicTestAndClear 0000af60 T _OSAtomicTestAndClearBarrier 0000af3c T _OSAtomicTestAndSet 0000af3c T _OSAtomicTestAndSetBarrier 0000ae5c T _OSAtomicXor32 0000ae5c T _OSAtomicXor32Barrier 0000aea4 T _OSAtomicXor32Orig 0000aea4 T _OSAtomicXor32OrigBarrier 0000afa0 T _OSMemoryBarrier 0000af8c T _OSSpinLockLock 0000af84 T _OSSpinLockTry 0000af94 T _OSSpinLockUnlock 000b9f4c T _OSSystemInfo [0:590] > nm -arch ppc /usr/lib/libc.dylib | grep OS 0000bc94 T _OSAtomicAdd32 0000be4c T _OSAtomicAdd32Barrier 0000bcc4 T _OSAtomicAnd32 0000bea4 T _OSAtomicAnd32Barrier 0000bd4c T _OSAtomicAnd32Orig 0000bf2c T _OSAtomicAnd32OrigBarrier 0000bdac T _OSAtomicCompareAndSwap32 0000bf8c T _OSAtomicCompareAndSwap32Barrier 0000bdb0 T _OSAtomicCompareAndSwapInt 0000bf90 T _OSAtomicCompareAndSwapIntBarrier 0000bdb8 T _OSAtomicCompareAndSwapLong 0000bf98 T _OSAtomicCompareAndSwapLongBarrier 0000bdb4 T _OSAtomicCompareAndSwapPtr 0000bf94 T _OSAtomicCompareAndSwapPtrBarrier 0000c040 T _OSAtomicDequeue 0000c03c T _OSAtomicEnqueue 0000bc98 T _OSAtomicOr32 0000be78 T _OSAtomicOr32Barrier 0000bd1c T _OSAtomicOr32Orig 0000befc T _OSAtomicOr32OrigBarrier 0000be04 T _OSAtomicTestAndClear 0000bfe4 T _OSAtomicTestAndClearBarrier 0000bdbc T _OSAtomicTestAndSet 0000bf9c T _OSAtomicTestAndSetBarrier 0000bcf0 T _OSAtomicXor32 0000bed0 T _OSAtomicXor32Barrier 0000bd7c T _OSAtomicXor32Orig 0000bf5c T _OSAtomicXor32OrigBarrier 0000c038 T _OSMemoryBarrier 0000c030 T _OSSpinLockLock 0000c02c T _OSSpinLockTry 0000c034 T _OSSpinLockUnlock 000dda38 T _OSSystemInfo -Shawn _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com