2
0

syscall_defs.h 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /* $OpenBSD: signal.h,v 1.19 2006/01/08 14:20:16 millert Exp $ */
  2. /* $NetBSD: signal.h,v 1.21 1996/02/09 18:25:32 christos Exp $ */
  3. /*
  4. * Copyright (c) 1982, 1986, 1989, 1991, 1993
  5. * The Regents of the University of California. All rights reserved.
  6. * (c) UNIX System Laboratories, Inc.
  7. * All or some portions of this file are derived from material licensed
  8. * to the University of California by American Telephone and Telegraph
  9. * Co. or Unix System Laboratories, Inc. and are reproduced herein with
  10. * the permission of UNIX System Laboratories, Inc.
  11. *
  12. * Redistribution and use in source and binary forms, with or without
  13. * modification, are permitted provided that the following conditions
  14. * are met:
  15. * 1. Redistributions of source code must retain the above copyright
  16. * notice, this list of conditions and the following disclaimer.
  17. * 2. Redistributions in binary form must reproduce the above copyright
  18. * notice, this list of conditions and the following disclaimer in the
  19. * documentation and/or other materials provided with the distribution.
  20. * 3. Neither the name of the University nor the names of its contributors
  21. * may be used to endorse or promote products derived from this software
  22. * without specific prior written permission.
  23. *
  24. * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  25. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  26. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  27. * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  28. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  29. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  30. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  31. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  32. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  33. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  34. * SUCH DAMAGE.
  35. *
  36. * @(#)signal.h 8.2 (Berkeley) 1/21/94
  37. */
  38. #define TARGET_NSIG 32 /* counting 0; could be 33 (mask is 1-32) */
  39. #define TARGET_SIGHUP 1 /* hangup */
  40. #define TARGET_SIGINT 2 /* interrupt */
  41. #define TARGET_SIGQUIT 3 /* quit */
  42. #define TARGET_SIGILL 4 /* illegal instruction (not reset when caught) */
  43. #define TARGET_SIGTRAP 5 /* trace trap (not reset when caught) */
  44. #define TARGET_SIGABRT 6 /* abort() */
  45. #define TARGET_SIGIOT SIGABRT /* compatibility */
  46. #define TARGET_SIGEMT 7 /* EMT instruction */
  47. #define TARGET_SIGFPE 8 /* floating point exception */
  48. #define TARGET_SIGKILL 9 /* kill (cannot be caught or ignored) */
  49. #define TARGET_SIGBUS 10 /* bus error */
  50. #define TARGET_SIGSEGV 11 /* segmentation violation */
  51. #define TARGET_SIGSYS 12 /* bad argument to system call */
  52. #define TARGET_SIGPIPE 13 /* write on a pipe with no one to read it */
  53. #define TARGET_SIGALRM 14 /* alarm clock */
  54. #define TARGET_SIGTERM 15 /* software termination signal from kill */
  55. #define TARGET_SIGURG 16 /* urgent condition on IO channel */
  56. #define TARGET_SIGSTOP 17 /* sendable stop signal not from tty */
  57. #define TARGET_SIGTSTP 18 /* stop signal from tty */
  58. #define TARGET_SIGCONT 19 /* continue a stopped process */
  59. #define TARGET_SIGCHLD 20 /* to parent on child stop or exit */
  60. #define TARGET_SIGTTIN 21 /* to readers pgrp upon background tty read */
  61. #define TARGET_SIGTTOU 22 /* like TTIN for output if (tp->t_local&LTOSTOP) */
  62. #define TARGET_SIGIO 23 /* input/output possible signal */
  63. #define TARGET_SIGXCPU 24 /* exceeded CPU time limit */
  64. #define TARGET_SIGXFSZ 25 /* exceeded file size limit */
  65. #define TARGET_SIGVTALRM 26 /* virtual time alarm */
  66. #define TARGET_SIGPROF 27 /* profiling time alarm */
  67. #define TARGET_SIGWINCH 28 /* window size changes */
  68. #define TARGET_SIGINFO 29 /* information request */
  69. #define TARGET_SIGUSR1 30 /* user defined signal 1 */
  70. #define TARGET_SIGUSR2 31 /* user defined signal 2 */
  71. /*
  72. * Language spec says we must list exactly one parameter, even though we
  73. * actually supply three. Ugh!
  74. */
  75. #define TARGET_SIG_DFL (void (*)(int))0
  76. #define TARGET_SIG_IGN (void (*)(int))1
  77. #define TARGET_SIG_ERR (void (*)(int))-1
  78. #define TARGET_SA_ONSTACK 0x0001 /* take signal on signal stack */
  79. #define TARGET_SA_RESTART 0x0002 /* restart system on signal return */
  80. #define TARGET_SA_RESETHAND 0x0004 /* reset to SIG_DFL when taking signal */
  81. #define TARGET_SA_NODEFER 0x0010 /* don't mask the signal we're delivering */
  82. #define TARGET_SA_NOCLDWAIT 0x0020 /* don't create zombies (assign to pid 1) */
  83. #define TARGET_SA_USERTRAMP 0x0100 /* do not bounce off kernel's sigtramp */
  84. #define TARGET_SA_NOCLDSTOP 0x0008 /* do not generate SIGCHLD on child stop */
  85. #define TARGET_SA_SIGINFO 0x0040 /* generate siginfo_t */
  86. /*
  87. * Flags for sigprocmask:
  88. */
  89. #define TARGET_SIG_BLOCK 1 /* block specified signal set */
  90. #define TARGET_SIG_UNBLOCK 2 /* unblock specified signal set */
  91. #define TARGET_SIG_SETMASK 3 /* set specified signal set */
  92. #define TARGET_BADSIG SIG_ERR
  93. #define TARGET_SS_ONSTACK 0x0001 /* take signals on alternate stack */
  94. #define TARGET_SS_DISABLE 0x0004 /* disable taking signals on alternate stack */
  95. #include "errno_defs.h"
  96. #include "freebsd/syscall_nr.h"
  97. #include "netbsd/syscall_nr.h"
  98. #include "openbsd/syscall_nr.h"
  99. struct target_iovec {
  100. abi_long iov_base; /* Starting address */
  101. abi_long iov_len; /* Number of bytes */
  102. };