xref: /freebsd/sys/compat/linux/linux_signal.h (revision 7f2d13d60721803155950276e0282fcd1e6bacc3)
151705ff7SMarcel Moolenaar /*-
2*7f2d13d6SPedro F. Giffuni  * SPDX-License-Identifier: BSD-3-Clause
3*7f2d13d6SPedro F. Giffuni  *
451705ff7SMarcel Moolenaar  * Copyright (c) 2000 Marcel Moolenaar
551705ff7SMarcel Moolenaar  * All rights reserved.
651705ff7SMarcel Moolenaar  *
751705ff7SMarcel Moolenaar  * Redistribution and use in source and binary forms, with or without
851705ff7SMarcel Moolenaar  * modification, are permitted provided that the following conditions
951705ff7SMarcel Moolenaar  * are met:
1051705ff7SMarcel Moolenaar  * 1. Redistributions of source code must retain the above copyright
1151705ff7SMarcel Moolenaar  *    notice, this list of conditions and the following disclaimer
1251705ff7SMarcel Moolenaar  *    in this position and unchanged.
1351705ff7SMarcel Moolenaar  * 2. Redistributions in binary form must reproduce the above copyright
1451705ff7SMarcel Moolenaar  *    notice, this list of conditions and the following disclaimer in the
1551705ff7SMarcel Moolenaar  *    documentation and/or other materials provided with the distribution.
1651705ff7SMarcel Moolenaar  * 3. The name of the author may not be used to endorse or promote products
17bc34729cSMarcel Moolenaar  *    derived from this software without specific prior written permission.
1851705ff7SMarcel Moolenaar  *
1951705ff7SMarcel Moolenaar  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
2051705ff7SMarcel Moolenaar  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
2151705ff7SMarcel Moolenaar  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
2251705ff7SMarcel Moolenaar  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
2351705ff7SMarcel Moolenaar  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2451705ff7SMarcel Moolenaar  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2551705ff7SMarcel Moolenaar  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2651705ff7SMarcel Moolenaar  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2751705ff7SMarcel Moolenaar  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2851705ff7SMarcel Moolenaar  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2951705ff7SMarcel Moolenaar  *
3051705ff7SMarcel Moolenaar  * $FreeBSD$
3151705ff7SMarcel Moolenaar  */
3251705ff7SMarcel Moolenaar 
3351705ff7SMarcel Moolenaar #ifndef _LINUX_SIGNAL_H_
3451705ff7SMarcel Moolenaar #define _LINUX_SIGNAL_H_
3551705ff7SMarcel Moolenaar 
36fe4ed1e7SDmitry Chagin /*
37fe4ed1e7SDmitry Chagin  * si_code values
38fe4ed1e7SDmitry Chagin  */
39fe4ed1e7SDmitry Chagin #define	LINUX_SI_USER		0	/* sent by kill, sigsend, raise */
40fe4ed1e7SDmitry Chagin #define	LINUX_SI_KERNEL		0x80	/* sent by the kernel from somewhere */
41fe4ed1e7SDmitry Chagin #define	LINUX_SI_QUEUE		-1	/* sent by sigqueue */
42fe4ed1e7SDmitry Chagin #define	LINUX_SI_TIMER		-2	/* sent by timer expiration */
43fe4ed1e7SDmitry Chagin #define	LINUX_SI_MESGQ		-3	/* sent by real time mesq state change */
44fe4ed1e7SDmitry Chagin #define	LINUX_SI_ASYNCIO	-4	/* sent by AIO completion */
45fe4ed1e7SDmitry Chagin #define	LINUX_SI_SIGIO		-5	/* sent by queued SIGIO */
46fe4ed1e7SDmitry Chagin #define	LINUX_SI_TKILL		-6	/* sent by tkill system call */
47aa8b2011SKonstantin Belousov 
48b63dc6adSAlfred Perlstein int linux_do_sigaction(struct thread *, int, l_sigaction_t *, l_sigaction_t *);
49fe4ed1e7SDmitry Chagin void ksiginfo_to_lsiginfo(const ksiginfo_t *ksi, l_siginfo_t *lsi, l_int sig);
50fe4ed1e7SDmitry Chagin void siginfo_to_lsiginfo(const siginfo_t *si, l_siginfo_t *lsi, l_int sig);
517ac9766dSDmitry Chagin void lsiginfo_to_ksiginfo(const l_siginfo_t *lsi, ksiginfo_t *ksi, int sig);
5251705ff7SMarcel Moolenaar 
5351705ff7SMarcel Moolenaar #endif /* _LINUX_SIGNAL_H_ */
54