Browse Source

* fixed previous commit

git-svn-id: trunk@1623 -
florian 20 years ago
parent
commit
9e30922547
2 changed files with 9 additions and 4 deletions
  1. 7 2
      rtl/inc/threadh.inc
  2. 2 2
      rtl/win32/tthread.inc

+ 7 - 2
rtl/inc/threadh.inc

@@ -15,8 +15,13 @@
  **********************************************************************}
  **********************************************************************}
 
 
 const
 const
-   DefaultStackSize = 32768; { including 16384 margin for stackchecking }
-
+{$ifdef mswindows}
+  { on windows, use stack size of starting process }
+  DefaultStackSize = 0;
+{$else mswindows}
+  { including 16384 margin for stackchecking }
+  DefaultStackSize = 32768;
+{$endif mswindows}
 
 
 type
 type
   PEventState = pointer;
   PEventState = pointer;

+ 2 - 2
rtl/win32/tthread.inc

@@ -124,8 +124,8 @@ begin
   FSuspended := CreateSuspended;
   FSuspended := CreateSuspended;
   Flags := 0;
   Flags := 0;
   if CreateSuspended then Flags := CREATE_SUSPENDED;
   if CreateSuspended then Flags := CREATE_SUSPENDED;
-  FHandle := BeginThread(nil, 0, @ThreadProc, pointer(self), Flags,
-                         FThreadID, StackSize);
+  FHandle := BeginThread(nil, StackSize, @ThreadProc, pointer(self), Flags,
+                         FThreadID);
   FFatalException := nil;
   FFatalException := nil;
 end;
 end;