Home | History | Annotate | Line # | Download | only in m68k
linux_signal.h revision 1.1
      1  1.1  itohy /* 	$NetBSD: linux_signal.h,v 1.1 1998/12/15 19:25:41 itohy Exp $	*/
      2  1.1  itohy 
      3  1.1  itohy /*-
      4  1.1  itohy  * Copyright (c) 1998 The NetBSD Foundation, Inc.
      5  1.1  itohy  * All rights reserved.
      6  1.1  itohy  *
      7  1.1  itohy  * This code is derived from software contributed to The NetBSD Foundation
      8  1.1  itohy  * by Eric Haszlakiewicz.
      9  1.1  itohy  *
     10  1.1  itohy  * Redistribution and use in source and binary forms, with or without
     11  1.1  itohy  * modification, are permitted provided that the following conditions
     12  1.1  itohy  * are met:
     13  1.1  itohy  * 1. Redistributions of source code must retain the above copyright
     14  1.1  itohy  *    notice, this list of conditions and the following disclaimer.
     15  1.1  itohy  * 2. Redistributions in binary form must reproduce the above copyright
     16  1.1  itohy  *    notice, this list of conditions and the following disclaimer in the
     17  1.1  itohy  *    documentation and/or other materials provided with the distribution.
     18  1.1  itohy  * 3. All advertising materials mentioning features or use of this software
     19  1.1  itohy  *    must display the following acknowledgement:
     20  1.1  itohy  *	This product includes software developed by the NetBSD
     21  1.1  itohy  *	Foundation, Inc. and its contributors.
     22  1.1  itohy  * 4. Neither the name of The NetBSD Foundation nor the names of its
     23  1.1  itohy  *    contributors may be used to endorse or promote products derived
     24  1.1  itohy  *    from this software without specific prior written permission.
     25  1.1  itohy  *
     26  1.1  itohy  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     27  1.1  itohy  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     28  1.1  itohy  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     29  1.1  itohy  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     30  1.1  itohy  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     31  1.1  itohy  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     32  1.1  itohy  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     33  1.1  itohy  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     34  1.1  itohy  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     35  1.1  itohy  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     36  1.1  itohy  * POSSIBILITY OF SUCH DAMAGE.
     37  1.1  itohy  */
     38  1.1  itohy 
     39  1.1  itohy /*
     40  1.1  itohy  * Whoever decided how linux would handle
     41  1.1  itohy  * binary compatibility should be shot.
     42  1.1  itohy  */
     43  1.1  itohy 
     44  1.1  itohy #ifndef _M68K_LINUX_SIGNAL_H
     45  1.1  itohy #define _M68K_LINUX_SIGNAL_H
     46  1.1  itohy 
     47  1.1  itohy #define LINUX_SIGHUP	 1
     48  1.1  itohy #define LINUX_SIGINT	 2
     49  1.1  itohy #define LINUX_SIGQUIT	 3
     50  1.1  itohy #define LINUX_SIGILL	 4
     51  1.1  itohy #define LINUX_SIGTRAP	 5
     52  1.1  itohy #define LINUX_SIGABRT	 6
     53  1.1  itohy #define LINUX_SIGBUS	 7
     54  1.1  itohy #define LINUX_SIGFPE	 8
     55  1.1  itohy #define LINUX_SIGKILL	 9
     56  1.1  itohy #define LINUX_SIGUSR1	10
     57  1.1  itohy #define LINUX_SIGSEGV	11
     58  1.1  itohy #define LINUX_SIGUSR2	12
     59  1.1  itohy #define LINUX_SIGPIPE	13
     60  1.1  itohy #define LINUX_SIGALRM	14
     61  1.1  itohy #define LINUX_SIGTERM	15
     62  1.1  itohy #define LINUX_SIGSTKFLT	16
     63  1.1  itohy #define LINUX_SIGCHLD	17
     64  1.1  itohy #define LINUX_SIGCONT	18
     65  1.1  itohy #define LINUX_SIGSTOP	19
     66  1.1  itohy #define LINUX_SIGTSTP	20
     67  1.1  itohy #define LINUX_SIGTTIN	21
     68  1.1  itohy #define LINUX_SIGTTOU	22
     69  1.1  itohy #define LINUX_SIGURG	23
     70  1.1  itohy #define LINUX_SIGXCPU	24
     71  1.1  itohy #define LINUX_SIGXFSZ	25
     72  1.1  itohy #define LINUX_SIGVTALRM	26
     73  1.1  itohy #define LINUX_SIGPROF	27
     74  1.1  itohy #define LINUX_SIGWINCH	28
     75  1.1  itohy #define LINUX_SIGIO	29
     76  1.1  itohy #define LINUX_SIGPWR	30
     77  1.1  itohy #define LINUX_SIGUNUSED	31
     78  1.1  itohy 
     79  1.1  itohy #define LINUX_SIGIOT	LINUX_SIGABRT
     80  1.1  itohy #define LINUX_SIGPOLL	LINUX_SIGIO
     81  1.1  itohy 
     82  1.1  itohy #define LINUX__NSIG		64
     83  1.1  itohy #define LINUX__NSIG_BPW		32
     84  1.1  itohy #define LINUX__NSIG_WORDS	(LINUX__NSIG / LINUX__NSIG_BPW)
     85  1.1  itohy #define LINUX_NSIG		32
     86  1.1  itohy 
     87  1.1  itohy /* Min/max real-time linux signal */
     88  1.1  itohy #define LINUX_SIGRTMIN		32
     89  1.1  itohy #define LINUX_SIGRTMAX		(LINUX__NSIG-1)
     90  1.1  itohy 
     91  1.1  itohy /* sa_flags */
     92  1.1  itohy #define LINUX_SA_NOCLDSTOP	0x00000001
     93  1.1  itohy #define LINUX_SA_NOCLDWAIT	0x00000002
     94  1.1  itohy #define LINUX_SA_SIGINFO	0x00000004
     95  1.1  itohy #define LINUX_SA_ONSTACK	0x08000000
     96  1.1  itohy #define LINUX_SA_RESTART	0x10000000
     97  1.1  itohy #define LINUX_SA_NODEFER	0x40000000
     98  1.1  itohy #define LINUX_SA_RESETHAND	0x80000000
     99  1.1  itohy 
    100  1.1  itohy #define LINUX_SA_NOMASK		LINUX_SA_NODEFER
    101  1.1  itohy #define LINUX_SA_ONESHOT	LINUX_SA_RESETHAND
    102  1.1  itohy #define LINUX_SA_INTERRUPT	0x20000000	/* Ignore this */
    103  1.1  itohy 
    104  1.1  itohy #define LINUX_SA_ALLBITS	0xf8000007
    105  1.1  itohy 
    106  1.1  itohy #define LINUX_SIG_BLOCK		0
    107  1.1  itohy #define LINUX_SIG_UNBLOCK	1
    108  1.1  itohy #define LINUX_SIG_SETMASK	2
    109  1.1  itohy 
    110  1.1  itohy typedef void	(*linux_handler_t) __P((int));
    111  1.1  itohy 
    112  1.1  itohy typedef u_long	linux_old_sigset_t;
    113  1.1  itohy typedef struct {
    114  1.1  itohy 	u_long sig[LINUX__NSIG_WORDS];
    115  1.1  itohy } linux_sigset_t;
    116  1.1  itohy 
    117  1.1  itohy struct linux_old_sigaction {
    118  1.1  itohy 	linux_handler_t		sa_handler;
    119  1.1  itohy 	linux_old_sigset_t	sa_mask;
    120  1.1  itohy 	u_long			sa_flags;
    121  1.1  itohy 	void			(*sa_restorer) __P((void));
    122  1.1  itohy };
    123  1.1  itohy 
    124  1.1  itohy /* Used in rt_* calls */
    125  1.1  itohy struct linux_sigaction {
    126  1.1  itohy 	linux_handler_t		sa_handler;
    127  1.1  itohy 	u_long			sa_flags;
    128  1.1  itohy 	void			(*sa_restorer) __P((void));
    129  1.1  itohy 	linux_sigset_t		sa_mask;
    130  1.1  itohy };
    131  1.1  itohy 
    132  1.1  itohy struct linux_k_sigaction {
    133  1.1  itohy 	struct linux_sigaction	sa;
    134  1.1  itohy #define k_sa_restorer	sa.sa_restorer
    135  1.1  itohy };
    136  1.1  itohy 
    137  1.1  itohy typedef struct linux_sigaltstack {
    138  1.1  itohy 	void			*ss_sp;
    139  1.1  itohy 	int			ss_flags;
    140  1.1  itohy 	size_t			ss_size;
    141  1.1  itohy } linux_stack_t;
    142  1.1  itohy 
    143  1.1  itohy /* ss_flags */
    144  1.1  itohy #define LINUX_SS_ONSTACK	1
    145  1.1  itohy #define LINUX_SS_DISABLE	2
    146  1.1  itohy 
    147  1.1  itohy #endif /* !_M68K_LINUX_SIGNAL_H */
    148