mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-23 19:29:33 +02:00
+ added some WASM32 functions
git-svn-id: branches/wasm@48241 -
This commit is contained in:
parent
899d718895
commit
de15809f62
@ -18,3 +18,93 @@
|
||||
procedure fpc_cpuinit;
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
{$define FPC_SYSTEM_HAS_GET_CALLER_ADDR}
|
||||
function get_caller_addr(framebp:pointer;addr:pointer=nil):pointer;
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
{$define FPC_SYSTEM_HAS_GET_CALLER_FRAME}
|
||||
function get_caller_frame(framebp:pointer;addr:pointer=nil):pointer;
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
{$define FPC_SYSTEM_HAS_SPTR}
|
||||
function Sptr : pointer;
|
||||
begin
|
||||
end;
|
||||
|
||||
|
||||
function InterLockedDecrement (var Target: longint) : longint;
|
||||
begin
|
||||
dec(Target);
|
||||
Result:=Target;
|
||||
end;
|
||||
|
||||
|
||||
function InterLockedIncrement (var Target: longint) : longint;
|
||||
begin
|
||||
inc(Target);
|
||||
Result:=Target;
|
||||
end;
|
||||
|
||||
|
||||
function InterLockedExchange (var Target: longint;Source : longint) : longint;
|
||||
begin
|
||||
Result:=Target;
|
||||
Target:=Source;
|
||||
end;
|
||||
|
||||
|
||||
function InterlockedCompareExchange(var Target: longint; NewValue: longint; Comperand: longint): longint;
|
||||
begin
|
||||
Result:=Target;
|
||||
if Target=Comperand then
|
||||
Target:=NewValue;
|
||||
end;
|
||||
|
||||
|
||||
function InterLockedExchangeAdd (var Target: longint;Source : longint) : longint;
|
||||
begin
|
||||
Result:=Target;
|
||||
inc(Target,Source);
|
||||
end;
|
||||
|
||||
|
||||
function InterLockedDecrement (var Target: smallint) : smallint;
|
||||
begin
|
||||
dec(Target);
|
||||
Result:=Target;
|
||||
end;
|
||||
|
||||
|
||||
function InterLockedIncrement (var Target: smallint) : smallint;
|
||||
begin
|
||||
inc(Target);
|
||||
Result:=Target;
|
||||
end;
|
||||
|
||||
|
||||
function InterLockedExchange (var Target: smallint;Source : smallint) : smallint;
|
||||
begin
|
||||
Result:=Target;
|
||||
Target:=Source;
|
||||
end;
|
||||
|
||||
|
||||
function InterlockedCompareExchange(var Target: smallint; NewValue: smallint; Comperand: smallint): smallint;
|
||||
begin
|
||||
Result:=Target;
|
||||
if Target=Comperand then
|
||||
Target:=NewValue;
|
||||
end;
|
||||
|
||||
|
||||
function InterLockedExchangeAdd (var Target: smallint;Source : smallint) : smallint;
|
||||
begin
|
||||
Result:=Target;
|
||||
inc(Target,Source);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user