Atomic Add Fail


/ Published in: C
Save to your folder(s)

C concurrency failure


Copy this code and paste it in your HTML
  1. int64_t AddAndGetAtomic(Object *o, int64_t amount) {
  2. OSAtomicAdd64(amount, &(o->counter));
  3. return o->counter;
  4. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.