Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-09-11 16:28:50


Phil Endecott:

> Well it's quicker for me to try this:
>
> int x;
>
> int main(int argc, char* argv[])
> {
> __sync_fetch_and_add(&x,1);
> }
>
> $ arm-linux-gnu-g++ --version
> arm-linux-gnu-g++ (GCC) 4.1.2 20061028 (prerelease) (Debian 4.1.1-19)
>
> $ arm-linux-gnu-g++ -W -Wall check_sync_builtin.cc
> check_sync_builtin.cc:3: warning: unused parameter â?~argcâ?T
> check_sync_builtin.cc:3: warning: unused parameter â?~argvâ?T
> /tmp/ccwWxfsT.o: In function `main':
> check_sync_builtin.cc:(.text+0x20): undefined reference to
> `__sync_fetch_and_add_4'

Do __sync_lock_test_and_set and __sync_lock_release work?


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