diff options
Diffstat (limited to 'gcc/ada/s-proinf-irix-athread.adb')
-rw-r--r-- | gcc/ada/s-proinf-irix-athread.adb | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/gcc/ada/s-proinf-irix-athread.adb b/gcc/ada/s-proinf-irix-athread.adb index 1baf726e414..a5c81c1de85 100644 --- a/gcc/ada/s-proinf-irix-athread.adb +++ b/gcc/ada/s-proinf-irix-athread.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1997-2005 Free Software Foundation, Inc. -- +-- Copyright (C) 1997-2007, 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- -- @@ -31,10 +31,10 @@ -- -- ------------------------------------------------------------------------------ --- This is an Irix (old pthread library) version of this package. +-- This is an Irix (old pthread library) version of this package --- This package contains the parameters used by the run-time system at --- program startup. These parameters are isolated in this package body to +-- This package contains the parameters used by the run-time system at +-- program startup. These parameters are isolated in this package body to -- facilitate replacement by the end user. -- -- To replace the default values, copy this source file into your build @@ -44,10 +44,9 @@ -- % gcc -c -O2 -gnatpg s-proinf.adb -- -- then relink your application as usual. --- -pragma Warnings (Off); -with GNAT.OS_Lib; +pragma Warnings (Off); -- why??? +with System.OS_Lib; pragma Warnings (On); package body System.Program_Info is @@ -75,8 +74,8 @@ package body System.Program_Info is MP_NPROCS : constant := 1; -- # processor in complex - Pthread_Sproc_Count : constant GNAT.OS_Lib.String_Access := - GNAT.OS_Lib.Getenv ("PTHREAD_SPROC_COUNT"); + Pthread_Sproc_Count : constant System.OS_Lib.String_Access := + System.OS_Lib.Getenv ("PTHREAD_SPROC_COUNT"); begin if Pthread_Sproc_Count.all'Length = 0 then @@ -88,6 +87,7 @@ package body System.Program_Info is else return Integer'Value (Pthread_Sproc_Count.all); end if; + exception when others => return Default_Initial_Sproc_Count; @@ -98,8 +98,8 @@ package body System.Program_Info is --------------------- function Max_Sproc_Count return Integer is - Pthread_Max_Sproc_Count : constant GNAT.OS_Lib.String_Access := - GNAT.OS_Lib.Getenv ("PTHREAD_MAX_SPROC_COUNT"); + Pthread_Max_Sproc_Count : constant System.OS_Lib.String_Access := + System.OS_Lib.Getenv ("PTHREAD_MAX_SPROC_COUNT"); begin if Pthread_Max_Sproc_Count.all'Length = 0 then @@ -126,10 +126,12 @@ package body System.Program_Info is ------------------------ function Default_Time_Slice return Duration is - Pthread_Time_Slice_Sec : constant GNAT.OS_Lib.String_Access := - GNAT.OS_Lib.Getenv ("PTHREAD_TIME_SLICE_SEC"); - Pthread_Time_Slice_Usec : constant GNAT.OS_Lib.String_Access := - GNAT.OS_Lib.Getenv ("PTHREAD_TIME_SLICE_USEC"); + Pthread_Time_Slice_Sec : constant System.OS_Lib.String_Access := + System.OS_Lib.Getenv + ("PTHREAD_TIME_SLICE_SEC"); + Pthread_Time_Slice_Usec : constant System.OS_Lib.String_Access := + System.OS_Lib.Getenv + ("PTHREAD_TIME_SLICE_USEC"); Val_Sec, Val_Usec : Integer := 0; @@ -169,9 +171,9 @@ package body System.Program_Info is ----------------------- function Stack_Guard_Pages return Integer is - Pthread_Stack_Guard_Pages : constant GNAT.OS_Lib.String_Access := - GNAT.OS_Lib.Getenv ("PTHREAD_STACK_GUARD_PAGES"); - + Pthread_Stack_Guard_Pages : constant System.OS_Lib.String_Access := + System.OS_Lib.Getenv + ("PTHREAD_STACK_GUARD_PAGES"); begin if Pthread_Stack_Guard_Pages.all'Length /= 0 then return Integer'Value (Pthread_Stack_Guard_Pages.all); @@ -197,8 +199,9 @@ package body System.Program_Info is ------------------------ function Pthread_Arena_Size return Integer is - Pthread_Arena_Size : constant GNAT.OS_Lib.String_Access := - GNAT.OS_Lib.Getenv ("PTHREAD_ARENA_SIZE"); + Pthread_Arena_Size : constant System.OS_Lib.String_Access := + System.OS_Lib.Getenv + ("PTHREAD_ARENA_SIZE"); begin if Pthread_Arena_Size.all'Length = 0 then @@ -206,6 +209,7 @@ package body System.Program_Info is else return Integer'Value (Pthread_Arena_Size.all); end if; + exception when others => return Default_Pthread_Arena_Size; |