mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-25 20:14:46 +08:00
[Ada] RTEMS: use regular RTEMS API for minimum stack size calculation
gcc/ada/ * libgnat/s-parame__rtems.adb: use _POSIX_Threads_Minimum_stack_size instead of ada_pthread_minimum_stack_size.
This commit is contained in:
parent
ddbcda718c
commit
0f076494f1
@ -35,10 +35,6 @@ with Interfaces.C;
|
||||
|
||||
package body System.Parameters is
|
||||
|
||||
function ada_pthread_minimum_stack_size return Interfaces.C.size_t;
|
||||
pragma Import (C, ada_pthread_minimum_stack_size,
|
||||
"_ada_pthread_minimum_stack_size");
|
||||
|
||||
-------------------------
|
||||
-- Adjust_Storage_Size --
|
||||
-------------------------
|
||||
@ -61,8 +57,15 @@ package body System.Parameters is
|
||||
------------------------
|
||||
|
||||
function Default_Stack_Size return Size_Type is
|
||||
Default_Stack_Size : constant Integer
|
||||
with Import, Convention => C,
|
||||
External_Name => "__gl_default_stack_size";
|
||||
begin
|
||||
return Size_Type (ada_pthread_minimum_stack_size);
|
||||
if Default_Stack_Size = -1 then
|
||||
return 32 * 1024;
|
||||
else
|
||||
return Size_Type (Default_Stack_Size);
|
||||
end if;
|
||||
end Default_Stack_Size;
|
||||
|
||||
------------------------
|
||||
@ -70,9 +73,11 @@ package body System.Parameters is
|
||||
------------------------
|
||||
|
||||
function Minimum_Stack_Size return Size_Type is
|
||||
|
||||
POSIX_Threads_Minimum_stack_size : constant Interfaces.C.size_t
|
||||
with Import, Convention => C,
|
||||
External_Name => "_POSIX_Threads_Minimum_stack_size";
|
||||
begin
|
||||
return Size_Type (ada_pthread_minimum_stack_size);
|
||||
return Size_Type (POSIX_Threads_Minimum_stack_size);
|
||||
end Minimum_Stack_Size;
|
||||
|
||||
end System.Parameters;
|
||||
|
Loading…
Reference in New Issue
Block a user