18 lines
145 B
PHP
18 lines
145 B
PHP
|
|
||
|
;;
|
||
|
lock_acquire:
|
||
|
lock bts [eax], 0
|
||
|
jnc .end
|
||
|
@@:
|
||
|
pause
|
||
|
test [eax], 1
|
||
|
jne @b
|
||
|
|
||
|
lock bts [eax], 0
|
||
|
jc @b
|
||
|
.end:
|
||
|
ret
|
||
|
|
||
|
release:
|
||
|
mov [eax], 0
|