sigstack.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /* sigstack, sigaltstack definitions.
  2. Copyright (C) 1998, 2000, 2002, 2003 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 _SIGNAL_H
  16. # error "Never include this file directly. Use <signal.h> instead"
  17. #endif
  18. #ifndef _SIGSTACK_H
  19. #define _SIGSTACK_H 1
  20. #if defined __UCLIBC_SUSV4_LEGACY__ || !defined __UCLIBC_STRICT_HEADERS__
  21. /* Structure describing a signal stack (obsolete). */
  22. struct sigstack
  23. {
  24. __ptr_t ss_sp; /* Signal stack pointer. */
  25. int ss_onstack; /* Nonzero if executing on this stack. */
  26. };
  27. #endif
  28. /* Possible values for `ss_flags.'. */
  29. enum
  30. {
  31. SS_ONSTACK = 1,
  32. #define SS_ONSTACK SS_ONSTACK
  33. SS_DISABLE
  34. #define SS_DISABLE SS_DISABLE
  35. };
  36. /* Minimum stack size for a signal handler.
  37. Yes, this should be 131072 but the constant got defined incorrectly
  38. in the kernel and we have to live with it. Users should in any case
  39. use SIGSTKSZ as the size user-supplied buffers should have. */
  40. #define MINSIGSTKSZ 131027
  41. /* System default stack size. */
  42. #define SIGSTKSZ 262144
  43. /* Alternate, preferred interface. */
  44. typedef struct sigaltstack
  45. {
  46. __ptr_t ss_sp;
  47. int ss_flags;
  48. size_t ss_size;
  49. } stack_t;
  50. #endif /* bits/sigstack.h */