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