aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/s-taprop-mingw.adb
diff options
context:
space:
mode:
authorPascal Obry <obry@gnat.com>2004-10-27 14:28:25 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2004-10-27 14:28:25 +0200
commitcc35610031fca77a8294a5c0e19dcb7fb8eb9888 (patch)
tree0db4c40cdc047ab66734576e2532ca51e81ab5ec /gcc/ada/s-taprop-mingw.adb
parent9d96e398afe016d4fcc1def0a5ecfa30517e1455 (diff)
downloadgcc-cc35610031fca77a8294a5c0e19dcb7fb8eb9888.zip
gcc-cc35610031fca77a8294a5c0e19dcb7fb8eb9888.tar.gz
gcc-cc35610031fca77a8294a5c0e19dcb7fb8eb9888.tar.bz2
s-parame-mingw.adb (Default_Stack_Size): Add some comments.
2004-10-26 Pascal Obry <obry@gnat.com> * s-parame-mingw.adb (Default_Stack_Size): Add some comments. * s-taprop-mingw.adb (Create_Task): Set initial stack size to 1024. On Windows only the initial thread stack size can be set so it is good to start we a low stack size. The OS will adjust the size as needed. From-SVN: r89641
Diffstat (limited to 'gcc/ada/s-taprop-mingw.adb')
-rw-r--r--gcc/ada/s-taprop-mingw.adb9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ada/s-taprop-mingw.adb b/gcc/ada/s-taprop-mingw.adb
index 5656661..e85d903 100644
--- a/gcc/ada/s-taprop-mingw.adb
+++ b/gcc/ada/s-taprop-mingw.adb
@@ -843,6 +843,13 @@ package body System.Task_Primitives.Operations is
Priority : System.Any_Priority;
Succeeded : out Boolean)
is
+ pragma Unreferenced (Stack_Size);
+
+ Initial_Stack_Size : constant := 1024;
+ -- We set the initial stack size to 1024. On Windows there is no way to
+ -- fix a task stack size. Only the initial stack size can be set, the
+ -- operating system will raise the task stack size if needed.
+
hTask : HANDLE;
TaskId : aliased DWORD;
pTaskParameter : System.OS_Interface.PVOID;
@@ -856,7 +863,7 @@ package body System.Task_Primitives.Operations is
hTask := CreateThread
(null,
- DWORD (Adjust_Storage_Size (Stack_Size)),
+ Initial_Stack_Size,
Entry_Point,
pTaskParameter,
DWORD (Create_Suspended),