xref: /openbmc/qemu/bsd-user/syscall_defs.h (revision 78cfb07f)
184778508Sblueswir1 /*      $OpenBSD: signal.h,v 1.19 2006/01/08 14:20:16 millert Exp $     */
284778508Sblueswir1 /*      $NetBSD: signal.h,v 1.21 1996/02/09 18:25:32 christos Exp $     */
384778508Sblueswir1 
484778508Sblueswir1 /*
584778508Sblueswir1  * Copyright (c) 1982, 1986, 1989, 1991, 1993
684778508Sblueswir1  *      The Regents of the University of California.  All rights reserved.
784778508Sblueswir1  * (c) UNIX System Laboratories, Inc.
884778508Sblueswir1  * All or some portions of this file are derived from material licensed
984778508Sblueswir1  * to the University of California by American Telephone and Telegraph
1084778508Sblueswir1  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
1184778508Sblueswir1  * the permission of UNIX System Laboratories, Inc.
1284778508Sblueswir1  *
1384778508Sblueswir1  * Redistribution and use in source and binary forms, with or without
1484778508Sblueswir1  * modification, are permitted provided that the following conditions
1584778508Sblueswir1  * are met:
1684778508Sblueswir1  * 1. Redistributions of source code must retain the above copyright
1784778508Sblueswir1  *    notice, this list of conditions and the following disclaimer.
1884778508Sblueswir1  * 2. Redistributions in binary form must reproduce the above copyright
1984778508Sblueswir1  *    notice, this list of conditions and the following disclaimer in the
2084778508Sblueswir1  *    documentation and/or other materials provided with the distribution.
2184778508Sblueswir1  * 3. Neither the name of the University nor the names of its contributors
2284778508Sblueswir1  *    may be used to endorse or promote products derived from this software
2384778508Sblueswir1  *    without specific prior written permission.
2484778508Sblueswir1  *
2584778508Sblueswir1  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2684778508Sblueswir1  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2784778508Sblueswir1  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2884778508Sblueswir1  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2984778508Sblueswir1  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3084778508Sblueswir1  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3184778508Sblueswir1  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3284778508Sblueswir1  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3384778508Sblueswir1  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3484778508Sblueswir1  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3584778508Sblueswir1  * SUCH DAMAGE.
3684778508Sblueswir1  *
3784778508Sblueswir1  *      @(#)signal.h    8.2 (Berkeley) 1/21/94
3884778508Sblueswir1  */
3984778508Sblueswir1 
4084778508Sblueswir1 #define TARGET_NSIG     32              /* counting 0; could be 33 (mask is 1-32) */
4184778508Sblueswir1 
4284778508Sblueswir1 #define TARGET_SIGHUP  1       /* hangup */
4384778508Sblueswir1 #define TARGET_SIGINT  2       /* interrupt */
4484778508Sblueswir1 #define TARGET_SIGQUIT 3       /* quit */
4584778508Sblueswir1 #define TARGET_SIGILL  4       /* illegal instruction (not reset when caught) */
4684778508Sblueswir1 #define TARGET_SIGTRAP 5       /* trace trap (not reset when caught) */
4784778508Sblueswir1 #define TARGET_SIGABRT 6       /* abort() */
4884778508Sblueswir1 #define TARGET_SIGIOT  SIGABRT /* compatibility */
4984778508Sblueswir1 #define TARGET_SIGEMT  7       /* EMT instruction */
5084778508Sblueswir1 #define TARGET_SIGFPE  8       /* floating point exception */
5184778508Sblueswir1 #define TARGET_SIGKILL 9       /* kill (cannot be caught or ignored) */
5284778508Sblueswir1 #define TARGET_SIGBUS  10      /* bus error */
5384778508Sblueswir1 #define TARGET_SIGSEGV 11      /* segmentation violation */
5484778508Sblueswir1 #define TARGET_SIGSYS  12      /* bad argument to system call */
5584778508Sblueswir1 #define TARGET_SIGPIPE 13      /* write on a pipe with no one to read it */
5684778508Sblueswir1 #define TARGET_SIGALRM 14      /* alarm clock */
5784778508Sblueswir1 #define TARGET_SIGTERM 15      /* software termination signal from kill */
5884778508Sblueswir1 #define TARGET_SIGURG  16      /* urgent condition on IO channel */
5984778508Sblueswir1 #define TARGET_SIGSTOP 17      /* sendable stop signal not from tty */
6084778508Sblueswir1 #define TARGET_SIGTSTP 18      /* stop signal from tty */
6184778508Sblueswir1 #define TARGET_SIGCONT 19      /* continue a stopped process */
6284778508Sblueswir1 #define TARGET_SIGCHLD 20      /* to parent on child stop or exit */
6384778508Sblueswir1 #define TARGET_SIGTTIN 21      /* to readers pgrp upon background tty read */
6484778508Sblueswir1 #define TARGET_SIGTTOU 22      /* like TTIN for output if (tp->t_local&LTOSTOP) */
6584778508Sblueswir1 #define TARGET_SIGIO   23      /* input/output possible signal */
6684778508Sblueswir1 #define TARGET_SIGXCPU 24      /* exceeded CPU time limit */
6784778508Sblueswir1 #define TARGET_SIGXFSZ 25      /* exceeded file size limit */
6884778508Sblueswir1 #define TARGET_SIGVTALRM 26    /* virtual time alarm */
6984778508Sblueswir1 #define TARGET_SIGPROF 27      /* profiling time alarm */
7084778508Sblueswir1 #define TARGET_SIGWINCH 28      /* window size changes */
7184778508Sblueswir1 #define TARGET_SIGINFO  29      /* information request */
7284778508Sblueswir1 #define TARGET_SIGUSR1 30       /* user defined signal 1 */
7384778508Sblueswir1 #define TARGET_SIGUSR2 31       /* user defined signal 2 */
7484778508Sblueswir1 
7584778508Sblueswir1 /*
7684778508Sblueswir1  * Language spec says we must list exactly one parameter, even though we
7784778508Sblueswir1  * actually supply three.  Ugh!
7884778508Sblueswir1  */
7984778508Sblueswir1 #define TARGET_SIG_DFL         (void (*)(int))0
8084778508Sblueswir1 #define TARGET_SIG_IGN         (void (*)(int))1
8184778508Sblueswir1 #define TARGET_SIG_ERR         (void (*)(int))-1
8284778508Sblueswir1 
8384778508Sblueswir1 #define TARGET_SA_ONSTACK       0x0001  /* take signal on signal stack */
8484778508Sblueswir1 #define TARGET_SA_RESTART       0x0002  /* restart system on signal return */
8584778508Sblueswir1 #define TARGET_SA_RESETHAND     0x0004  /* reset to SIG_DFL when taking signal */
8684778508Sblueswir1 #define TARGET_SA_NODEFER       0x0010  /* don't mask the signal we're delivering */
8784778508Sblueswir1 #define TARGET_SA_NOCLDWAIT     0x0020  /* don't create zombies (assign to pid 1) */
8884778508Sblueswir1 #define TARGET_SA_USERTRAMP    0x0100  /* do not bounce off kernel's sigtramp */
8984778508Sblueswir1 #define TARGET_SA_NOCLDSTOP     0x0008  /* do not generate SIGCHLD on child stop */
9084778508Sblueswir1 #define TARGET_SA_SIGINFO       0x0040  /* generate siginfo_t */
9184778508Sblueswir1 
9284778508Sblueswir1 /*
9384778508Sblueswir1  * Flags for sigprocmask:
9484778508Sblueswir1  */
9584778508Sblueswir1 #define TARGET_SIG_BLOCK       1       /* block specified signal set */
9684778508Sblueswir1 #define TARGET_SIG_UNBLOCK     2       /* unblock specified signal set */
9784778508Sblueswir1 #define TARGET_SIG_SETMASK     3       /* set specified signal set */
9884778508Sblueswir1 
9984778508Sblueswir1 #define TARGET_BADSIG          SIG_ERR
10084778508Sblueswir1 
10184778508Sblueswir1 #define TARGET_SS_ONSTACK       0x0001  /* take signals on alternate stack */
10284778508Sblueswir1 #define TARGET_SS_DISABLE       0x0004  /* disable taking signals on alternate stack */
10384778508Sblueswir1 
10484778508Sblueswir1 #include "errno_defs.h"
10584778508Sblueswir1 
10684778508Sblueswir1 #include "freebsd/syscall_nr.h"
10784778508Sblueswir1 #include "netbsd/syscall_nr.h"
10884778508Sblueswir1 #include "openbsd/syscall_nr.h"
109*78cfb07fSJuergen Lock 
110*78cfb07fSJuergen Lock struct target_iovec {
111*78cfb07fSJuergen Lock     abi_long iov_base;   /* Starting address */
112*78cfb07fSJuergen Lock     abi_long iov_len;   /* Number of bytes */
113*78cfb07fSJuergen Lock };
114*78cfb07fSJuergen Lock 
115