mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 06:59:24 +02:00
* several 64 bit issues fixed
This commit is contained in:
parent
0c35b6f3c4
commit
934fe41c45
@ -339,7 +339,7 @@ begin
|
|||||||
else
|
else
|
||||||
ambig:=true;
|
ambig:=true;
|
||||||
end;
|
end;
|
||||||
inc(longint(p),sizeof(toption));
|
inc(pointer(p),sizeof(toption));
|
||||||
inc(option_index);
|
inc(option_index);
|
||||||
end;
|
end;
|
||||||
if ambig and not exact then
|
if ambig and not exact then
|
||||||
@ -506,7 +506,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.5 2002-11-20 14:31:22 jonas
|
Revision 1.6 2004-02-22 16:48:39 florian
|
||||||
|
* several 64 bit issues fixed
|
||||||
|
|
||||||
|
Revision 1.5 2002/11/20 14:31:22 jonas
|
||||||
* applied fix from Maxim Artemev (bert_raccoon@freemail.ru)
|
* applied fix from Maxim Artemev (bert_raccoon@freemail.ru)
|
||||||
|
|
||||||
Revision 1.4 2002/03/28 20:54:25 carl
|
Revision 1.4 2002/03/28 20:54:25 carl
|
||||||
|
@ -41,18 +41,18 @@ Var
|
|||||||
{*****************************************************************************
|
{*****************************************************************************
|
||||||
Overloaded functions
|
Overloaded functions
|
||||||
*****************************************************************************}
|
*****************************************************************************}
|
||||||
|
{$ifndef CPU64}
|
||||||
function BeginThread(sa : Pointer;stacksize : dword;
|
function BeginThread(sa : Pointer;stacksize : dword;
|
||||||
ThreadFunction : tthreadfunc;p : pointer;creationFlags : dword;
|
ThreadFunction : tthreadfunc;p : pointer;creationFlags : dword;
|
||||||
var ThreadId : Longint) : DWord;
|
var ThreadId : Longint) : DWord;
|
||||||
begin
|
begin
|
||||||
BeginThread:=BeginThread(nil,StackSize,ThreadFunction,p,creationFlags,Dword(THreadId));
|
BeginThread:=BeginThread(nil,StackSize,ThreadFunction,p,creationFlags,THandle(THreadId));
|
||||||
end;
|
end;
|
||||||
|
{$endif CPU64}
|
||||||
|
|
||||||
function BeginThread(ThreadFunction : tthreadfunc) : DWord;
|
function BeginThread(ThreadFunction : tthreadfunc) : DWord;
|
||||||
var
|
var
|
||||||
dummy : dword;
|
dummy : THandle;
|
||||||
begin
|
begin
|
||||||
BeginThread:=BeginThread(nil,DefaultStackSize,ThreadFunction,nil,0,dummy);
|
BeginThread:=BeginThread(nil,DefaultStackSize,ThreadFunction,nil,0,dummy);
|
||||||
end;
|
end;
|
||||||
@ -60,30 +60,31 @@ Var
|
|||||||
|
|
||||||
function BeginThread(ThreadFunction : tthreadfunc;p : pointer) : DWord;
|
function BeginThread(ThreadFunction : tthreadfunc;p : pointer) : DWord;
|
||||||
var
|
var
|
||||||
dummy : dword;
|
dummy : THandle;
|
||||||
begin
|
begin
|
||||||
BeginThread:=BeginThread(nil,DefaultStackSize,ThreadFunction,p,0,dummy);
|
BeginThread:=BeginThread(nil,DefaultStackSize,ThreadFunction,p,0,dummy);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function BeginThread(ThreadFunction : tthreadfunc;p : pointer;var ThreadId : DWord) : DWord;
|
function BeginThread(ThreadFunction : tthreadfunc;p : pointer;var ThreadId : THandle) : DWord;
|
||||||
begin
|
begin
|
||||||
BeginThread:=BeginThread(nil,DefaultStackSize,ThreadFunction,p,0,ThreadId);
|
BeginThread:=BeginThread(nil,DefaultStackSize,ThreadFunction,p,0,ThreadId);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{$ifndef CPU64}
|
||||||
function BeginThread(ThreadFunction : tthreadfunc;p : pointer;var ThreadId : Longint) : DWord;
|
function BeginThread(ThreadFunction : tthreadfunc;p : pointer;var ThreadId : Longint) : DWord;
|
||||||
begin
|
begin
|
||||||
BeginThread:=BeginThread(nil,DefaultStackSize,ThreadFunction,p,0,Dword(ThreadId));
|
BeginThread:=BeginThread(nil,DefaultStackSize,ThreadFunction,p,0,THandle(ThreadId));
|
||||||
end;
|
end;
|
||||||
|
{$endif CPU64}
|
||||||
|
|
||||||
procedure EndThread;
|
procedure EndThread;
|
||||||
begin
|
begin
|
||||||
EndThread(0);
|
EndThread(0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function BeginThread(sa : Pointer;stacksize : dword; ThreadFunction : tthreadfunc;p : pointer;creationFlags : dword; var ThreadId : DWord) : DWord;
|
function BeginThread(sa : Pointer;stacksize : dword; ThreadFunction : tthreadfunc;p : pointer;creationFlags : dword; var ThreadId : THandle) : DWord;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result:=CurrentTM.BeginThread(sa,stacksize,threadfunction,P,creationflags,ThreadID);
|
Result:=CurrentTM.BeginThread(sa,stacksize,threadfunction,P,creationflags,ThreadID);
|
||||||
@ -216,7 +217,7 @@ end;
|
|||||||
|
|
||||||
function NoBeginThread(sa : Pointer;stacksize : dword;
|
function NoBeginThread(sa : Pointer;stacksize : dword;
|
||||||
ThreadFunction : tthreadfunc;p : pointer;
|
ThreadFunction : tthreadfunc;p : pointer;
|
||||||
creationFlags : dword; var ThreadId : DWord) : DWord;
|
creationFlags : dword; var ThreadId : THandle) : DWord;
|
||||||
begin
|
begin
|
||||||
NoThreadError;
|
NoThreadError;
|
||||||
end;
|
end;
|
||||||
@ -322,7 +323,10 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.8 2004-01-21 20:11:06 peter
|
Revision 1.9 2004-02-22 16:48:39 florian
|
||||||
|
* several 64 bit issues fixed
|
||||||
|
|
||||||
|
Revision 1.8 2004/01/21 20:11:06 peter
|
||||||
* fixed compile for unix
|
* fixed compile for unix
|
||||||
|
|
||||||
Revision 1.7 2004/01/20 23:13:53 hajny
|
Revision 1.7 2004/01/20 23:13:53 hajny
|
||||||
|
@ -23,7 +23,7 @@ type
|
|||||||
TThreadFunc = function(parameter : pointer) : longint;
|
TThreadFunc = function(parameter : pointer) : longint;
|
||||||
|
|
||||||
// Function prototypes for TThreadManager Record.
|
// Function prototypes for TThreadManager Record.
|
||||||
TBeginThreadHandler = Function (sa : Pointer;stacksize : dword; ThreadFunction : tthreadfunc;p : pointer;creationFlags : dword; var ThreadId : DWord) : DWord;
|
TBeginThreadHandler = Function (sa : Pointer;stacksize : dword; ThreadFunction : tthreadfunc;p : pointer;creationFlags : dword; var ThreadId : THandle) : DWord;
|
||||||
TEndThreadHandler = Procedure (ExitCode : DWord);
|
TEndThreadHandler = Procedure (ExitCode : DWord);
|
||||||
// Used for Suspend/Resume/Kill
|
// Used for Suspend/Resume/Kill
|
||||||
TThreadHandler = Function (threadHandle : dword) : dword;
|
TThreadHandler = Function (threadHandle : dword) : dword;
|
||||||
@ -83,18 +83,22 @@ procedure InitThread(stklen:cardinal);
|
|||||||
|
|
||||||
function BeginThread(sa : Pointer;stacksize : dword;
|
function BeginThread(sa : Pointer;stacksize : dword;
|
||||||
ThreadFunction : tthreadfunc;p : pointer;creationFlags : dword;
|
ThreadFunction : tthreadfunc;p : pointer;creationFlags : dword;
|
||||||
var ThreadId : DWord) : DWord;
|
var ThreadId : THandle) : DWord;
|
||||||
|
{$ifndef CPU64}
|
||||||
{ Delphi uses a longint for threadid }
|
{ Delphi uses a longint for threadid }
|
||||||
function BeginThread(sa : Pointer;stacksize : dword;
|
function BeginThread(sa : Pointer;stacksize : dword;
|
||||||
ThreadFunction : tthreadfunc;p : pointer;creationFlags : dword;
|
ThreadFunction : tthreadfunc;p : pointer;creationFlags : dword;
|
||||||
var ThreadId : Longint) : DWord;
|
var ThreadId : Longint) : DWord;
|
||||||
|
{$endif CPU64}
|
||||||
|
|
||||||
{ add some simplfied forms which make lifer easier and porting }
|
{ add some simplfied forms which make lifer easier and porting }
|
||||||
{ to other OSes too ... }
|
{ to other OSes too ... }
|
||||||
function BeginThread(ThreadFunction : tthreadfunc) : DWord;
|
function BeginThread(ThreadFunction : tthreadfunc) : DWord;
|
||||||
function BeginThread(ThreadFunction : tthreadfunc;p : pointer) : DWord;
|
function BeginThread(ThreadFunction : tthreadfunc;p : pointer) : DWord;
|
||||||
function BeginThread(ThreadFunction : tthreadfunc;p : pointer; var ThreadId : DWord) : DWord;
|
function BeginThread(ThreadFunction : tthreadfunc;p : pointer; var ThreadId : THandle) : DWord;
|
||||||
|
{$ifndef CPU64}
|
||||||
function BeginThread(ThreadFunction : tthreadfunc;p : pointer; var ThreadId : Longint) : DWord;
|
function BeginThread(ThreadFunction : tthreadfunc;p : pointer; var ThreadId : Longint) : DWord;
|
||||||
|
{$endif CPU64}
|
||||||
|
|
||||||
procedure EndThread(ExitCode : DWord);
|
procedure EndThread(ExitCode : DWord);
|
||||||
procedure EndThread;
|
procedure EndThread;
|
||||||
@ -120,7 +124,10 @@ procedure LeaveCriticalsection(var cs : TRTLCriticalSection);
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.14 2003-11-29 17:29:32 michael
|
Revision 1.15 2004-02-22 16:48:39 florian
|
||||||
|
* several 64 bit issues fixed
|
||||||
|
|
||||||
|
Revision 1.14 2003/11/29 17:29:32 michael
|
||||||
+ Added overloaded version of SetThreadManager without old parameter
|
+ Added overloaded version of SetThreadManager without old parameter
|
||||||
|
|
||||||
Revision 1.13 2003/11/27 10:28:41 michael
|
Revision 1.13 2003/11/27 10:28:41 michael
|
||||||
|
@ -226,6 +226,7 @@ Procedure SetVariantProp(Instance: TObject; PropInfo : PPropInfo; const Value: V
|
|||||||
|
|
||||||
Function GetObjectProp(Instance: TObject; const PropName: string): TObject;
|
Function GetObjectProp(Instance: TObject; const PropName: string): TObject;
|
||||||
Function GetObjectProp(Instance: TObject; const PropName: string; MinClass: TClass): TObject;
|
Function GetObjectProp(Instance: TObject; const PropName: string; MinClass: TClass): TObject;
|
||||||
|
Function GetObjectProp(Instance: TObject; PropInfo: PPropInfo): TObject;
|
||||||
Function GetObjectProp(Instance: TObject; PropInfo: PPropInfo; MinClass: TClass): TObject;
|
Function GetObjectProp(Instance: TObject; PropInfo: PPropInfo; MinClass: TClass): TObject;
|
||||||
Procedure SetObjectProp(Instance: TObject; const PropName: string; Value: TObject);
|
Procedure SetObjectProp(Instance: TObject; const PropName: string; Value: TObject);
|
||||||
Procedure SetObjectProp(Instance: TObject; PropInfo: PPropInfo; Value: TObject);
|
Procedure SetObjectProp(Instance: TObject; PropInfo: PPropInfo; Value: TObject);
|
||||||
@ -786,6 +787,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Function GetObjectProp(Instance: TObject; PropInfo : PPropInfo): TObject;
|
||||||
|
begin
|
||||||
|
Result:=GetObjectProp(Instance,PropInfo,Nil);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
Function GetObjectProp(Instance: TObject; PropInfo : PPropInfo; MinClass: TClass): TObject;
|
Function GetObjectProp(Instance: TObject; PropInfo : PPropInfo; MinClass: TClass): TObject;
|
||||||
begin
|
begin
|
||||||
{$ifdef cpu64}
|
{$ifdef cpu64}
|
||||||
@ -1315,7 +1322,10 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.22 2004-02-21 22:53:49 florian
|
Revision 1.23 2004-02-22 16:48:39 florian
|
||||||
|
* several 64 bit issues fixed
|
||||||
|
|
||||||
|
Revision 1.22 2004/02/21 22:53:49 florian
|
||||||
* several 64 bit/x86-64 fixes
|
* several 64 bit/x86-64 fixes
|
||||||
|
|
||||||
Revision 1.21 2004/02/20 15:55:26 peter
|
Revision 1.21 2004/02/20 15:55:26 peter
|
||||||
|
@ -166,7 +166,7 @@ Uses
|
|||||||
|
|
||||||
function CBeginThread(sa : Pointer;stacksize : dword;
|
function CBeginThread(sa : Pointer;stacksize : dword;
|
||||||
ThreadFunction : tthreadfunc;p : pointer;
|
ThreadFunction : tthreadfunc;p : pointer;
|
||||||
creationFlags : dword; var ThreadId : DWord) : DWord;
|
creationFlags : dword; var ThreadId : THandle) : DWord;
|
||||||
var
|
var
|
||||||
ti : pthreadinfo;
|
ti : pthreadinfo;
|
||||||
thread_attr : pthread_attr_t;
|
thread_attr : pthread_attr_t;
|
||||||
@ -414,7 +414,10 @@ initialization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.8 2004-02-15 16:33:32 marco
|
Revision 1.9 2004-02-22 16:48:39 florian
|
||||||
|
* several 64 bit issues fixed
|
||||||
|
|
||||||
|
Revision 1.8 2004/02/15 16:33:32 marco
|
||||||
* linklibs fixed for new pthread mechanism on FreeBSD
|
* linklibs fixed for new pthread mechanism on FreeBSD
|
||||||
|
|
||||||
Revision 1.7 2004/01/20 23:13:53 hajny
|
Revision 1.7 2004/01/20 23:13:53 hajny
|
||||||
|
Loading…
Reference in New Issue
Block a user