+ added AtomicNotify() to the WebAssembly unit

This commit is contained in:
Nikolay Nikolov 2022-05-25 20:16:50 +03:00
parent 19cce3e42e
commit a916aa36d8

View File

@ -115,6 +115,11 @@ function AtomicWait(constref Mem: UInt32; Compare: UInt32; TimeoutNanoseconds: I
function AtomicWait(constref Mem: Int64; Compare: Int64; TimeoutNanoseconds: Int64): Int32;
function AtomicWait(constref Mem: UInt64; Compare: UInt64; TimeoutNanoseconds: Int64): Int32;
function AtomicNotify(constref Mem: Int32; Count: UInt32): UInt32; inline;
function AtomicNotify(constref Mem: UInt32; Count: UInt32): UInt32; inline;
function AtomicNotify(constref Mem: Int64; Count: UInt32): UInt32; inline;
function AtomicNotify(constref Mem: UInt64; Count: UInt32): UInt32; inline;
implementation
{$I cpuh.inc}
@ -504,4 +509,24 @@ begin
AtomicWait:=fpc_wasm32_memory_atomic_wait64(@Mem,Compare,TimeoutNanoseconds);
end;
function AtomicNotify(constref Mem: Int32; Count: UInt32): UInt32; inline;
begin
AtomicNotify:=fpc_wasm32_memory_atomic_notify(@Mem,Count);
end;
function AtomicNotify(constref Mem: UInt32; Count: UInt32): UInt32; inline;
begin
AtomicNotify:=fpc_wasm32_memory_atomic_notify(@Mem,Count);
end;
function AtomicNotify(constref Mem: Int64; Count: UInt32): UInt32; inline;
begin
AtomicNotify:=fpc_wasm32_memory_atomic_notify(@Mem,Count);
end;
function AtomicNotify(constref Mem: UInt64; Count: UInt32): UInt32; inline;
begin
AtomicNotify:=fpc_wasm32_memory_atomic_notify(@Mem,Count);
end;
end.