diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2008-04-08 08:43:15 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2008-04-08 08:43:15 +0200 |
commit | 770db697e62902a236c8cb4cf0e8b6cc52051703 (patch) | |
tree | 0e9bcf675dab91b0449162ce9f89d2a5215ca347 /gcc/ada/s-taskin.ads | |
parent | 42c3898c1d9a5351eaac6ffd792a5d1aaa268435 (diff) | |
download | gcc-770db697e62902a236c8cb4cf0e8b6cc52051703.tar.gz |
s-osinte-linux-alpha.ads, [...]: Removed.
2008-04-08 Eric Botcazou <ebotcazou@adacore.com>
Arnaud Charlet <charlet@adacore.com>
* s-osinte-linux-alpha.ads, s-osinte-linux-hppa.ads: Removed.
s-taspri-posix-noaltstack.ads, s-linux.ads, s-linux-alpha.ads,
s-linux-hppa.ads: New files. Disable alternate stack on ia64-hpux.
* s-osinte-lynxos-3.ads,
(Alternate_Stack): Remove when not needed. Simplify declaration
otherwise.
(Alternate_Stack_Size): New constant.
s-osinte-mingw.ads, s-taprop-mingw.adb: Code clean up: avoid use of
'Unrestricted_Access.
* s-osinte-hpux.ads, s-osinte-solaris-posix.ads, s-osinte-aix.ads,
s-osinte-lynxos.ads, s-osinte-freebsd.ads s-osinte-darwin.ads,
s-osinte-tru64.ads, s-osinte-irix.ads, s-osinte-linux.ads,
s-osinte-solaris.ads, s-osinte-vms.ads
(SA_ONSTACK): New constant.
(stack_t): New record type.
(sigaltstack): New imported function.
(Alternate_Stack): New imported variable.
(Alternate_Stack_Size): New constant.
* system-linux-x86_64.ads: (Stack_Check_Probes): Set to True.
* s-taspri-lynxos.ads, s-taspri-solaris.ads, s-taspri-tru64.ads,
s-taspri-hpux-dce.ads (Task_Address): New subtype of System.Address
(Task_Address_Size): New constant size of System.Address
(Alternate_Stack_Size): New constant.
* s-taprop-posix.adb, s-taprop-linux.adb (Get_Stack_Attributes): Delete.
(Enter_Task): Do not notify stack to System.Stack_Checking.Operations.
Establish the alternate stack if the platform makes use of n alternate
signal stack for stack overflows.
(Create_Task): Take into account the alternate stack in the stack size.
(Initialize): Save the address of the alternate stack into the ATCB for
the environment task.
(Create_Task): Fix assertions for NPTL library (vs old LinuxThreads).
* s-parame.adb (Minimum_Stack_Size): Increase value to 16K to
* system-linux-x86.ads: (Stack_Check_Probes): Set to True.
* s-intman-posix.adb:
(Initialize): Set SA_ONSTACK for SIGSEGV if the platform makes use of an
alternate signal stack for stack overflows.
* init.c (__gnat_adjust_context_for_raise, Linux version): On i386 and
x86-64, adjust the saved value of the stack pointer if the signal was
raised by a stack checking probe.
(HP-UX section): Use global __gnat_alternate_stack as signal handler
stack and only for SIGSEGV.
(Linux section): Likewise on x86 and x86-64.
[VxWorks section]
(__gnat_map_signal): Now static.
(__gnat_error_handler): Not static any more.
(__gnat_adjust_context_for_raise): New function. Signal context
adjustment for PPC && !VTHREADS && !RTP, as required by the zcx
propagation circuitry.
(__gnat_error_handler): Second argument of a sigaction handler is a
pointer, not an int, and is unused.
Adjust signal context before mapping to exception.
Install signal handlers for LynxOS case.
* s-taskin.ads (Common_ATCB): New field Task_Alternate_Stack.
(Task_Id): Set size to Task_Address_Size
(To_Task_id): Unchecked convert from Task_Address vice System.Address
(To_Address): Unchecked convert to Task_Address vice System.Address
* s-tassta.adb (Task_Wrapper): Define the alternate stack and save its
address into the ATCB if the platform makes use of an alternate signal
stack for stack overflows.
(Free_Task): Add call to Finalize_Attributes_Link.
Add argument Relative_Deadline to pass the value specified for
the task. This is not yet used for any target.
* s-tassta.ads (Create_Task): Add argument Relative_Deadline to pass
the value specified for the task.
From-SVN: r134004
Diffstat (limited to 'gcc/ada/s-taskin.ads')
-rw-r--r-- | gcc/ada/s-taskin.ads | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/gcc/ada/s-taskin.ads b/gcc/ada/s-taskin.ads index 045f176db02..85f8dfc6af7 100644 --- a/gcc/ada/s-taskin.ads +++ b/gcc/ada/s-taskin.ads @@ -106,6 +106,7 @@ package System.Tasking is type Ada_Task_Control_Block; type Task_Id is access all Ada_Task_Control_Block; + for Task_Id'Size use System.Task_Primitives.Task_Address_Size; Null_Task : constant Task_Id; @@ -117,9 +118,11 @@ package System.Tasking is -- from the run-time system. function To_Task_Id is - new Ada.Unchecked_Conversion (System.Address, Task_Id); + new Ada.Unchecked_Conversion + (System.Task_Primitives.Task_Address, Task_Id); function To_Address is - new Ada.Unchecked_Conversion (Task_Id, System.Address); + new Ada.Unchecked_Conversion + (Task_Id, System.Task_Primitives.Task_Address); ----------------------- -- Enumeration types -- @@ -340,7 +343,7 @@ package System.Tasking is -- Abnormal means that the task terminates because it is being aborted -- handled_Exception means that the task terminates because of exception - -- raised by by the execution of its task_body. + -- raised by the execution of its task_body. type Termination_Handler is access protected procedure (Cause : Cause_Of_Termination; @@ -492,6 +495,11 @@ package System.Tasking is -- Activator writes it, once, before Self starts executing. Thereafter, -- Self only reads it. + Task_Alternate_Stack : System.Address; + -- The address of the alternate signal stack for this task, if any + -- + -- Protection: Only accessed by Self + Task_Entry_Point : Task_Procedure_Access; -- Information needed to call the procedure containing the code for -- the body of this task. @@ -801,7 +809,8 @@ package System.Tasking is ------------------------------------ type Access_Address is access all System.Address; - -- Comment on what this is used for ??? + -- Anonymous pointer used to implement task attributes (see s-tataat.adb + -- and a-tasatt.adb) pragma No_Strict_Aliasing (Access_Address); -- This type is used in contexts where aliasing may be an issue (see |