site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=TqAI3z59D0+7jYMKkc0Sa6A1nid4S/v7uRqTSRekyAIMrE0l1xVd3y7kj91Nbx0/6N6i5U9YhO/07MZDshVnT1k4pKEWoSWprKVZudsMVibz9ubBI74pU0haol4C8a3zg+ULkNjWqTyqzO1WUMqoIQFYfDgrof7Cprnq84AlzMg= On 6/24/05, Jonas Maebe <jonas@zeus.ugent.be> wrote:
On 24 jun 2005, at 16:40, David Leimbach wrote:
Also, there are compare-and-swap routines already in libSystem:
<libkern/OSAtomic.h>
/* Compare and swap. They return true if the swap occured. */ bool OSAtomicCompareAndSwap32( int32_t oldValue, int32_t newValue, int32_t *theValue ); bool OSAtomicCompareAndSwap32Barrier( int32_t oldValue, int32_t newValue, int32_t *theValue );
Seems a shame to have to include an entire other framework just for a single assembly instruction :). It'd be really cool if apple had a lighter weight wrapper around such lock code :).
libSystem = libc
Note he wants me to use libkern. Which is it? :)
Jonas
_______________________________________________ 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/leimy2k%40gmail.com
This email sent to leimy2k@gmail.com
_______________________________________________ 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
participants (1)
-
David Leimbach