Browse Source

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

git-svn-id: trunk@1637 -
tom_at_work 20 years ago
parent
commit
324dd47e7e
3 changed files with 5 additions and 5 deletions
  1. 1 1
      rtl/go32v2/tthread.inc
  2. 2 2
      rtl/openbsd/tthread.inc
  3. 2 2
      rtl/wince/tthread.inc

+ 1 - 1
rtl/go32v2/tthread.inc

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

+ 2 - 2
rtl/openbsd/tthread.inc

@@ -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;
 

+ 2 - 2
rtl/wince/tthread.inc

@@ -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;