type __sync_fetch_and_{add,sub,or,and,xor,nand} (type *ptr, type value, ...); type __sync_{add,sub,or,and,xor,nand}_and_fetch (type *ptr, type value, ...); bool __sync_bool_compare_and_swap (type *ptr, type oldval type newval, ...); type __sync_val_compare_and_swap (type *ptr, type oldval type newval, ...); type __sync_lock_test_and_set (type *ptr, type value, ...); void __sync_lock_release (type *ptr, ...)
implemented for common scalars and pointers
typically supported by processor instructions
unsupported operations compiled as function calls