
11 Sep
2007
11 Sep
'07
8:28 p.m.
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?