foo() { volatile long int lock; retry: if (__sync_fetch_and_add(&lock, 0x00100000)) goto retry; }