* added stacksize parameter for TThread.Create for some platforms left out in commit 1621

git-svn-id: trunk@1637 -
This commit is contained in:
tom_at_work 2005-11-03 15:44:22 +00:00
parent a63ed341a7
commit 324dd47e7e
3 changed files with 5 additions and 5 deletions

View File

@ -46,7 +46,7 @@ begin
end;
constructor TThread.Create(CreateSuspended: Boolean);
constructor TThread.Create(CreateSuspended: Boolean; const StackSize: DWord = DefaultStackSize);
begin
{IsMultiThread := TRUE; }

View File

@ -186,7 +186,7 @@ begin
end;
{ TThread }
constructor TThread.Create(CreateSuspended: Boolean);
constructor TThread.Create(CreateSuspended: Boolean; const StackSize: DWord = DefaultStackSize);
begin
// lets just hope that the user doesn't create a thread
// via BeginThread and creates the first TThread Object in there!
@ -198,7 +198,7 @@ begin
FInitialSuspended := CreateSuspended;
FFatalException := nil;
WRITE_DEBUG('creating thread, self = ',longint(self));
FHandle:= BeginThread(@ThreadFunc, Pointer(Self), FThreadID);
FHandle:= BeginThread(@ThreadFunc, Pointer(Self), FThreadID, StackSize);
WRITE_DEBUG('TThread.Create done');
end;

View File

@ -114,7 +114,7 @@ begin
if FreeThread then Thread.Free;
end;
constructor TThread.Create(CreateSuspended: Boolean);
constructor TThread.Create(CreateSuspended: Boolean; const StackSize: DWord = DefaultStackSize);
var
Flags: Integer;
begin
@ -123,7 +123,7 @@ begin
FSuspended := CreateSuspended;
Flags := 0;
if CreateSuspended then Flags := CREATE_SUSPENDED;
FHandle := BeginThread(nil, 0, @ThreadProc, pointer(self), Flags, FThreadID);
FHandle := BeginThread(nil, StackSize, @ThreadProc, pointer(self), Flags, FThreadID);
FFatalException := nil;
end;