2 of 2
replaced http://codereview.stackexchange.com/ with https://codereview.stackexchange.com/
Op's code has a possible race condition between the lock and compare.
"lock xadd %[lock], %[gate]\n" "cmp %[lock], %[open]\n"
OP identified:
lock
is not certainly made a shared variable.
chux
- 36.2k
- 2
- 43
- 96
default