mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-06 19:38:33 +02:00
* use 16-bit offsets for threadvars on CPUs with 16-bit address space
git-svn-id: trunk@32013 -
This commit is contained in:
parent
2116552b36
commit
12a9664181
@ -1236,7 +1236,11 @@ implementation
|
|||||||
result:=crecorddef.create_global_internal(
|
result:=crecorddef.create_global_internal(
|
||||||
name,sizeof(pint),sizeof(pint),
|
name,sizeof(pint),sizeof(pint),
|
||||||
init_settings.alignment.maxCrecordalign);
|
init_settings.alignment.maxCrecordalign);
|
||||||
|
{$ifdef cpu16bitaddr}
|
||||||
|
index_field:=result.add_field_by_def('',u16inttype);
|
||||||
|
{$else cpu16bitaddr}
|
||||||
index_field:=result.add_field_by_def('',u32inttype);
|
index_field:=result.add_field_by_def('',u32inttype);
|
||||||
|
{$endif cpu16bitaddr}
|
||||||
non_mt_data_field:=result.add_field_by_def('',def);
|
non_mt_data_field:=result.add_field_by_def('',def);
|
||||||
{ no need to add alignment padding, we won't create arrays of these }
|
{ no need to add alignment padding, we won't create arrays of these }
|
||||||
end;
|
end;
|
||||||
|
@ -437,13 +437,13 @@ begin
|
|||||||
Result:=-1;
|
Result:=-1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure NoInitThreadvar(var offset : dword;size : dword);
|
procedure NoInitThreadvar(var offset : {$ifdef cpu16}word{$else}dword{$endif};size : dword);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
NoThreadError;
|
NoThreadError;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function NoRelocateThreadvar(offset : dword) : pointer;
|
function NoRelocateThreadvar(offset : {$ifdef cpu16}word{$else}dword{$endif}) : pointer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
NoThreadError;
|
NoThreadError;
|
||||||
|
@ -47,8 +47,8 @@ type
|
|||||||
TGetCurrentThreadIdHandler = Function : TThreadID;
|
TGetCurrentThreadIdHandler = Function : TThreadID;
|
||||||
TCriticalSectionHandler = Procedure (var cs);
|
TCriticalSectionHandler = Procedure (var cs);
|
||||||
TCriticalSectionHandlerTryEnter = function (var cs):longint;
|
TCriticalSectionHandlerTryEnter = function (var cs):longint;
|
||||||
TInitThreadVarHandler = Procedure(var offset : dword;size : dword);
|
TInitThreadVarHandler = Procedure(var offset : {$ifdef cpu16}word{$else}dword{$endif};size : dword);
|
||||||
TRelocateThreadVarHandler = Function(offset : dword) : pointer;
|
TRelocateThreadVarHandler = Function(offset : {$ifdef cpu16}word{$else}dword{$endif}) : pointer;
|
||||||
TAllocateThreadVarsHandler = Procedure;
|
TAllocateThreadVarsHandler = Procedure;
|
||||||
TReleaseThreadVarsHandler = Procedure;
|
TReleaseThreadVarsHandler = Procedure;
|
||||||
TBasicEventHandler = procedure(state:peventstate);
|
TBasicEventHandler = procedure(state:peventstate);
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
type
|
type
|
||||||
pltvInitEntry = ^ltvInitEntry;
|
pltvInitEntry = ^ltvInitEntry;
|
||||||
ltvInitEntry = packed record
|
ltvInitEntry = packed record
|
||||||
varaddr : pdword;
|
varaddr : {$ifdef cpu16}pword{$else}pdword{$endif};
|
||||||
size : longint;
|
size : longint;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user