Previous | Next --- Slide 73 of 75
Back to Lecture Thumbnails
bmehta22

int atomic_increment(int addr, int x) { int val = addr; while (atomicCAS(addr, val, val + x) != val) { val = *addr; } return val + x; }

Please log in to leave a comment.