* StackTop must be OS specific (and not CPU specific)

git-svn-id: trunk@46474 -
This commit is contained in:
florian 2020-08-17 17:50:43 +00:00
parent 15d1d00c34
commit 7e8a50452b
2 changed files with 7 additions and 15 deletions
rtl
freertos
xtensa

View File

@ -208,15 +208,17 @@ const calculated_cmdline:Pchar=nil;
{*****************************************************************************
Misc. System Dependent Functions
*****************************************************************************}
{$ifndef FPC_SYSTEM_HAS_STACKTOP}
var
_stack_top: record end; external name '_stack_top';
{ Interim fix for now, set to large address
TODO: provide more realistic value, possibly by inspecting stack pointer
when main or task is started
}
function StackTop: pointer;
begin
StackTop:=@_stack_top;
end;
{$endif FPC_SYSTEM_HAS_STACKTOP}
begin
StackTop:=pointer($3fffffff);
end;
procedure haltproc;cdecl;external name '_haltproc';

View File

@ -146,16 +146,6 @@ Function Sptr : pointer;assembler;
end;
{$define FPC_SYSTEM_HAS_STACKTOP}
// Interim fix for now, set to large address
// TODO: provide more realistic value, possibly by inspecting stack pointer
// when main or task is started
function StackTop: pointer;
begin
StackTop:=pointer($3fffffff);
end;
function InterLockedDecrement (var Target: longint) : longint;
var
temp_sreg : byte;