I am trying to use __sync_fetch_and_add with type as "long long" . This gives me the link error : undefined reference to `__sync_fetch_and_add_8' This compiles for a "int " type though. I am using the the gcc option -march=i686 Is it possible to do a 64 bit integer operation atomically with the __sync .. builtin functions ? Thanks Preeti.