aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/libgnat/s-parame__rtems.adb
diff options
context:
space:
mode:
authorGary Funck <gary@intrepid.com>2017-10-17 03:19:54 +0000
committerGary Funck <gary@intrepid.com>2017-10-17 03:19:54 +0000
commit94de5b24eede2f2ed005b253a2c584675cd682d8 (patch)
treeac7aa645d5d9139bd11f7410e3654026e3e2cd44 /gcc/ada/libgnat/s-parame__rtems.adb
parent7af4e6706d969f6d2402e0a50473a70a9c85e5be (diff)
parent8905b0de50e8b67dda7c2e787c840720b98a637d (diff)
Merge trunk version 253779 into gupc branch.gupc
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gupc@253802 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/libgnat/s-parame__rtems.adb')
-rw-r--r--gcc/ada/libgnat/s-parame__rtems.adb48
1 files changed, 30 insertions, 18 deletions
diff --git a/gcc/ada/libgnat/s-parame__rtems.adb b/gcc/ada/libgnat/s-parame__rtems.adb
index aa131147eb6..5a19c4396da 100644
--- a/gcc/ada/libgnat/s-parame__rtems.adb
+++ b/gcc/ada/libgnat/s-parame__rtems.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1997-2009 Free Software Foundation, Inc. --
+-- Copyright (C) 1997-2017, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -39,6 +39,35 @@ package body System.Parameters is
pragma Import (C, ada_pthread_minimum_stack_size,
"_ada_pthread_minimum_stack_size");
+ -------------------------
+ -- Adjust_Storage_Size --
+ -------------------------
+
+ function Adjust_Storage_Size (Size : Size_Type) return Size_Type is
+ begin
+ if Size = Unspecified_Size then
+ return Default_Stack_Size;
+
+ elsif Size < Minimum_Stack_Size then
+ return Minimum_Stack_Size;
+
+ else
+ return Size;
+ end if;
+ end Adjust_Storage_Size;
+
+ ----------------------------
+ -- Default_Sec_Stack_Size --
+ ----------------------------
+
+ function Default_Sec_Stack_Size return Size_Type is
+ Default_SS_Size : Integer;
+ pragma Import (C, Default_SS_Size,
+ "__gnat_default_ss_size");
+ begin
+ return Size_Type (Default_SS_Size);
+ end Default_Sec_Stack_Size;
+
------------------------
-- Default_Stack_Size --
------------------------
@@ -58,21 +87,4 @@ package body System.Parameters is
return Size_Type (ada_pthread_minimum_stack_size);
end Minimum_Stack_Size;
- -------------------------
- -- Adjust_Storage_Size --
- -------------------------
-
- function Adjust_Storage_Size (Size : Size_Type) return Size_Type is
- begin
- if Size = Unspecified_Size then
- return Default_Stack_Size;
-
- elsif Size < Minimum_Stack_Size then
- return Minimum_Stack_Size;
-
- else
- return Size;
- end if;
- end Adjust_Storage_Size;
-
end System.Parameters;