Posted By

starakaj on 12/02/11


Tagged


Versions (?)

Atomic Add Fail


 / Published in: C
 

C concurrency failure

  1. int64_t AddAndGetAtomic(Object *o, int64_t amount) {
  2. OSAtomicAdd64(amount, &(o->counter));
  3. return o->counter;
  4. }

Report this snippet  

You need to login to post a comment.