summaryrefslogtreecommitdiff
path: root/gcc/ada/s-stchop.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-14 08:44:14 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2007-08-14 08:44:14 +0000
commitf23c9933c11f9ff303565d97611d583fa550b2a4 (patch)
treeab952ee805e9aed74a88701e2571302c7e3bcd3f /gcc/ada/s-stchop.ads
parent89ce0207a2cbb8db3490005868cca90b94dc6e6e (diff)
downloadgcc-f23c9933c11f9ff303565d97611d583fa550b2a4.tar.gz
2007-08-14 Olivier Hainque <hainque@adacore.com>
* s-taprop-linux.adb (Get_Stack_Attributes): New subprogram. Fetch the stack size and initial stack pointer value for a given task. (Enter_Task): Get the stack attributes of the task we are entering and let the stack checking engine know about them. * s-stchop.adb, s-stchop.ads (Notify_Stack_Attributes): New subprogram. Let the stack-checking engine know about the initial sp value and stack size associated with the current task. (Set_Stack_Info): If a stack base has been notified for the current task, honor it. Fallback to the previous less accurate method otherwise. * s-stchop-vxworks.adb (Notify_Stack_Attributes): Dummy body. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127435 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-stchop.ads')
-rw-r--r--gcc/ada/s-stchop.ads12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ada/s-stchop.ads b/gcc/ada/s-stchop.ads
index 1c2f2a7ef91..9c38fc98cd8 100644
--- a/gcc/ada/s-stchop.ads
+++ b/gcc/ada/s-stchop.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1999-2006, Free Software Foundation, Inc. --
+-- Copyright (C) 1999-2007, Free Software Foundation, Inc. --
-- --
-- GNARL 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- --
@@ -42,6 +42,8 @@ pragma Polling (Off);
-- Turn off polling, we do not want polling to take place during stack
-- checking operations. It causes infinite loops and other problems.
+with System.Storage_Elements;
+
package System.Stack_Checking.Operations is
pragma Preelaborate;
@@ -59,6 +61,14 @@ package System.Stack_Checking.Operations is
function Stack_Check (Stack_Address : System.Address) return Stack_Access;
-- This version of Stack_Check should not be inlined
+ procedure Notify_Stack_Attributes
+ (Initial_SP : System.Address;
+ Size : System.Storage_Elements.Storage_Offset);
+ -- Register Initial_SP as the initial stack pointer value for the current
+ -- task when it starts and Size as the associated stack area size. This
+ -- should be called once, after the soft-links have been initialized and
+ -- prior to the first "Stack_Check" call.
+
private
Cache : aliased Stack_Access := Null_Stack;