1/* Library support for -fsplit-stack.  */
2/* Copyright (C) 2009-2015 Free Software Foundation, Inc.
3   Contributed by Ian Lance Taylor <iant@google.com>.
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify it under
8the terms of the GNU General Public License as published by the Free
9Software Foundation; either version 3, or (at your option) any later
10version.
11
12GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13WARRANTY; without even the implied warranty of MERCHANTABILITY or
14FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15for more details.
16
17Under Section 7 of GPL version 3, you are granted additional
18permissions described in the GCC Runtime Library Exception, version
193.1, as published by the Free Software Foundation.
20
21You should have received a copy of the GNU General Public License and
22a copy of the GCC Runtime Library Exception along with this program;
23see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
24<http://www.gnu.org/licenses/>.  */
25
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.  */
29
30/* The stack segment structure, defined in generic-morestack.c.  */
31
32struct stack_segment;
33
34/* The list of stack segments for this thread.  */
35
36extern __thread struct stack_segment *__morestack_segments;
37
38/* Print the string MSG/LEN, the errno number ERR, and a newline on
39   stderr, without using printf.  Then crash.  */
40
41extern void __morestack_fail (const char *msg, size_t len, int err)
42  __attribute__ ((noreturn, visibility ("hidden")));
43
44/* Release stack segments.  */
45
46extern struct dynamic_allocation_blocks *
47  __morestack_release_segments (struct stack_segment **, int)
48  __attribute__ ((visibility ("hidden")));
49
50/* Store the stack information in a processor dependent manner.  */
51
52extern void __stack_split_initialize (void)
53  __attribute__ ((visibility ("hidden")));
54