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