|
Boost : |
Subject: Re: [boost] [Boost.Thread]
From: edouard_at_[hidden]
Date: 2010-01-28 08:17:10
On Thu, 28 Jan 2010 16:10:58 +0300, Andrew Chinkoff <achinkoff_at_[hidden]>
wrote:
> if(IsNotEven(global_int)) // (1)
global_int is left unmodified
> #elif defined USE_SPINLOCKS
> if(__sync_fetch_and_and(&global_int, 1)) // (2)
global_int is modified
_sync_fetch_and_and is
tmp = *ptr;
*ptr = tmp & value;
return tmp;
Hope this helps.
-- Edouard
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk