mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-24 06:12:27 +00:00
Fix naming for redbean shared memory atomics
This commit is contained in:
parent
a5b483f2d4
commit
60b68d7152
4 changed files with 18 additions and 12 deletions
|
@ -54,7 +54,7 @@ function Lock()
|
|||
end
|
||||
end
|
||||
function Unlock()
|
||||
local old = mem:add(LOCK, -1)
|
||||
local old = mem:fetch_add(LOCK, -1)
|
||||
if old == 2 then
|
||||
mem:store(LOCK, 0)
|
||||
mem:wake(LOCK, 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue