generic-morestack.h 2.0 KB

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