/ Published in: C
C concurrency failure
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
int64_t AddAndGetAtomic(Object *o, int64_t amount) { OSAtomicAdd64(amount, &(o->counter)); return o->counter; }
int64_t AddAndGetAtomic(Object *o, int64_t amount) { OSAtomicAdd64(amount, &(o->counter)); return o->counter; }