sigstack.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* sigstack, sigaltstack definitions.
  2. Copyright (C) 1998-2017 Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Lesser General Public
  6. License as published by the Free Software Foundation; either
  7. version 2.1 of the License, or (at your option) any later version.
  8. The GNU C Library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Lesser General Public License for more details.
  12. You should have received a copy of the GNU Lesser General Public
  13. License along with the GNU C Library; if not, see
  14. <http://www.gnu.org/licenses/>. */
  15. #ifndef _BITS_SIGSTACK_H
  16. #define _BITS_SIGSTACK_H 1
  17. #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
  18. # error "Never include this file directly. Use <signal.h> instead"
  19. #endif
  20. #define __need_size_t
  21. #include <stddef.h>
  22. /* Structure describing a signal stack (obsolete). */
  23. struct sigstack
  24. {
  25. void *ss_sp; /* Signal stack pointer. */
  26. int ss_onstack; /* Nonzero if executing on this stack. */
  27. };
  28. /* Alternate, preferred interface. */
  29. typedef struct sigaltstack
  30. {
  31. void *ss_sp;
  32. int ss_flags;
  33. size_t ss_size;
  34. } stack_t;
  35. /* Possible values for `ss_flags'. */
  36. enum
  37. {
  38. SS_ONSTACK = 1,
  39. #define SS_ONSTACK SS_ONSTACK
  40. SS_DISABLE
  41. #define SS_DISABLE SS_DISABLE
  42. };
  43. /* Minimum stack size for a signal handler. */
  44. #define MINSIGSTKSZ 2048
  45. /* System default stack size. */
  46. #define SIGSTKSZ 8192
  47. #endif /* bits/sigstack.h */