소스 검색

* WebAssembly threads: set M.Locked to 0 on UnLockMutex

Nikolay Nikolov 1 년 전
부모
커밋
b9a6b01c97
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      rtl/wasi/wasmmutex.inc

+ 4 - 1
rtl/wasi/wasmmutex.inc

@@ -175,7 +175,10 @@ begin
     if (MutexKind(M)=mkRecursive) or (M.Count=1) then
       InterLockedDecrement(M.Count);
     if (M.Count=0) then
-      a:=fpc_wasm32_memory_atomic_notify(@M.Locked,1);
+      begin
+        M.Locked:=0;
+        a:=fpc_wasm32_memory_atomic_notify(@M.Locked,1);
+      end;
     end;
 end;