mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-04 05:58:23 +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(
|
||||
name,sizeof(pint),sizeof(pint),
|
||||
init_settings.alignment.maxCrecordalign);
|
||||
{$ifdef cpu16bitaddr}
|
||||
index_field:=result.add_field_by_def('',u16inttype);
|
||||
{$else cpu16bitaddr}
|
||||
index_field:=result.add_field_by_def('',u32inttype);
|
||||
{$endif cpu16bitaddr}
|
||||
non_mt_data_field:=result.add_field_by_def('',def);
|
||||
{ no need to add alignment padding, we won't create arrays of these }
|
||||
end;
|
||||
|
@ -437,13 +437,13 @@ begin
|
||||
Result:=-1;
|
||||
end;
|
||||
|
||||
procedure NoInitThreadvar(var offset : dword;size : dword);
|
||||
procedure NoInitThreadvar(var offset : {$ifdef cpu16}word{$else}dword{$endif};size : dword);
|
||||
|
||||
begin
|
||||
NoThreadError;
|
||||
end;
|
||||
|
||||
function NoRelocateThreadvar(offset : dword) : pointer;
|
||||
function NoRelocateThreadvar(offset : {$ifdef cpu16}word{$else}dword{$endif}) : pointer;
|
||||
|
||||
begin
|
||||
NoThreadError;
|
||||
|
@ -47,8 +47,8 @@ type
|
||||
TGetCurrentThreadIdHandler = Function : TThreadID;
|
||||
TCriticalSectionHandler = Procedure (var cs);
|
||||
TCriticalSectionHandlerTryEnter = function (var cs):longint;
|
||||
TInitThreadVarHandler = Procedure(var offset : dword;size : dword);
|
||||
TRelocateThreadVarHandler = Function(offset : dword) : pointer;
|
||||
TInitThreadVarHandler = Procedure(var offset : {$ifdef cpu16}word{$else}dword{$endif};size : dword);
|
||||
TRelocateThreadVarHandler = Function(offset : {$ifdef cpu16}word{$else}dword{$endif}) : pointer;
|
||||
TAllocateThreadVarsHandler = Procedure;
|
||||
TReleaseThreadVarsHandler = Procedure;
|
||||
TBasicEventHandler = procedure(state:peventstate);
|
||||
|
@ -23,7 +23,7 @@
|
||||
type
|
||||
pltvInitEntry = ^ltvInitEntry;
|
||||
ltvInitEntry = packed record
|
||||
varaddr : pdword;
|
||||
varaddr : {$ifdef cpu16}pword{$else}pdword{$endif};
|
||||
size : longint;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user