2012-01-31 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / libgcc / generic-morestack.h
blob12da0acfee4d943d84aa0c2d295d74ad5ebb85f2
1 /* Library support for -fsplit-stack. */
2 /* Copyright (C) 2009, 2010 Free Software Foundation, Inc.
3 Contributed by Ian Lance Taylor <iant@google.com>.
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 3, or (at your option) any later
10 version.
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
17 Under Section 7 of GPL version 3, you are granted additional
18 permissions described in the GCC Runtime Library Exception, version
19 3.1, as published by the Free Software Foundation.
21 You should have received a copy of the GNU General Public License and
22 a copy of the GCC Runtime Library Exception along with this program;
23 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
24 <http://www.gnu.org/licenses/>. */
26 /* This is a libgcc internal header file for functions shared between
27 generic-morestack.c and generic-morestack-thread.c. The latter
28 file is only used when linking with the pthread library. */
30 /* The stack segment structure, defined in generic-morestack.c. */
32 struct stack_segment;
34 /* The list of stack segments for this thread. */
36 extern __thread struct stack_segment *__morestack_segments;
38 /* Print the string MSG/LEN, the errno number ERR, and a newline on
39 stderr, without using printf. Then crash. */
41 extern void __morestack_fail (const char *msg, size_t len, int err)
42 __attribute__ ((noreturn, visibility ("hidden")));
44 /* Release stack segments. */
46 extern struct dynamic_allocation_blocks *
47 __morestack_release_segments (struct stack_segment **, int)
48 __attribute__ ((visibility ("hidden")));
50 /* Store the stack information in a processor dependent manner. */
52 extern void __stack_split_initialize (void)
53 __attribute__ ((visibility ("hidden")));