1*ce099b40Smartin /* $NetBSD: linux_signal.h,v 1.11 2008/04/28 20:23:43 martin Exp $ */ 23ec12572Smanu 33ec12572Smanu /*- 43ec12572Smanu * Copyright (c) 1995, 1998, 2001 The NetBSD Foundation, Inc. 53ec12572Smanu * All rights reserved. 63ec12572Smanu * 73ec12572Smanu * This code is derived from software contributed to The NetBSD Foundation 83ec12572Smanu * by Frank van der Linden, Eric Haszlakiewicz and Emmanuel Dreyfus. 93ec12572Smanu * 103ec12572Smanu * Redistribution and use in source and binary forms, with or without 113ec12572Smanu * modification, are permitted provided that the following conditions 123ec12572Smanu * are met: 133ec12572Smanu * 1. Redistributions of source code must retain the above copyright 143ec12572Smanu * notice, this list of conditions and the following disclaimer. 153ec12572Smanu * 2. Redistributions in binary form must reproduce the above copyright 163ec12572Smanu * notice, this list of conditions and the following disclaimer in the 173ec12572Smanu * documentation and/or other materials provided with the distribution. 183ec12572Smanu * 193ec12572Smanu * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 203ec12572Smanu * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 213ec12572Smanu * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 223ec12572Smanu * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 233ec12572Smanu * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 243ec12572Smanu * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 253ec12572Smanu * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 263ec12572Smanu * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 273ec12572Smanu * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 283ec12572Smanu * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 293ec12572Smanu * POSSIBILITY OF SUCH DAMAGE. 303ec12572Smanu */ 313ec12572Smanu 323ec12572Smanu #ifndef _POWERPC_LINUX_SIGNAL_H 333ec12572Smanu #define _POWERPC_LINUX_SIGNAL_H 343ec12572Smanu 353ec12572Smanu /* 363ec12572Smanu * Everything is from Linux's include/asm-ppc/signal.h 373ec12572Smanu */ 383ec12572Smanu #define LINUX_SIGHUP 1 393ec12572Smanu #define LINUX_SIGINT 2 403ec12572Smanu #define LINUX_SIGQUIT 3 413ec12572Smanu #define LINUX_SIGILL 4 423ec12572Smanu #define LINUX_SIGTRAP 5 433ec12572Smanu #define LINUX_SIGABRT 6 443ec12572Smanu #define LINUX_SIGIOT 6 453ec12572Smanu #define LINUX_SIGBUS 7 463ec12572Smanu #define LINUX_SIGFPE 8 473ec12572Smanu #define LINUX_SIGKILL 9 483ec12572Smanu #define LINUX_SIGUSR1 10 493ec12572Smanu #define LINUX_SIGSEGV 11 503ec12572Smanu #define LINUX_SIGUSR2 12 513ec12572Smanu #define LINUX_SIGPIPE 13 523ec12572Smanu #define LINUX_SIGALRM 14 533ec12572Smanu #define LINUX_SIGTERM 15 543ec12572Smanu #define LINUX_SIGSTKFLT 16 553ec12572Smanu #define LINUX_SIGCHLD 17 563ec12572Smanu #define LINUX_SIGCONT 18 573ec12572Smanu #define LINUX_SIGSTOP 19 583ec12572Smanu #define LINUX_SIGTSTP 20 593ec12572Smanu #define LINUX_SIGTTIN 21 603ec12572Smanu #define LINUX_SIGTTOU 22 613ec12572Smanu #define LINUX_SIGURG 23 623ec12572Smanu #define LINUX_SIGXCPU 24 633ec12572Smanu #define LINUX_SIGXFSZ 25 643ec12572Smanu #define LINUX_SIGVTALRM 26 653ec12572Smanu #define LINUX_SIGPROF 27 663ec12572Smanu #define LINUX_SIGWINCH 28 673ec12572Smanu #define LINUX_SIGIO 29 683ec12572Smanu #define LINUX_SIGPOLL LINUX_SIGIO 693ec12572Smanu #define LINUX_SIGLOST 29 703ec12572Smanu #define LINUX_SIGPWR 30 713ec12572Smanu #define LINUX_SIGSYS 31 723ec12572Smanu #define LINUX_SIGUNUSED 31 733ec12572Smanu #define LINUX_SIGRTMIN 32 743ec12572Smanu 75bda4b15eSchristos /* Min/max real-time linux signal */ 76bda4b15eSchristos #define LINUX_SIGRTMIN 32 77bda4b15eSchristos #define LINUX_SIGRTMAX (LINUX__NSIG - 1) 78bda4b15eSchristos 793ec12572Smanu #define LINUX__NSIG 64 803ec12572Smanu #define LINUX__NSIG_BPW 32 813ec12572Smanu #define LINUX__NSIG_WORDS (LINUX__NSIG / LINUX__NSIG_BPW) 823ec12572Smanu 833ec12572Smanu #define LINUX_SIG_BLOCK 0 843ec12572Smanu #define LINUX_SIG_UNBLOCK 1 853ec12572Smanu #define LINUX_SIG_SETMASK 2 863ec12572Smanu 873ec12572Smanu /* sa_flags */ 883ec12572Smanu #define LINUX_SA_NOCLDSTOP 0x00000001 89cbc3e62bSnathanw #define LINUX_SA_NOCLDWAIT 0x00000002 903ec12572Smanu #define LINUX_SA_SIGINFO 0x00000004 9153fb6703Smanu #define LINUX_SA_RESTORER 0x04000000 923ec12572Smanu #define LINUX_SA_ONSTACK 0x08000000 933ec12572Smanu #define LINUX_SA_RESTART 0x10000000 943ec12572Smanu #define LINUX_SA_INTERRUPT 0x20000000 953ec12572Smanu #define LINUX_SA_NODEFER 0x40000000 963ec12572Smanu #define LINUX_SA_RESETHAND 0x80000000 973ec12572Smanu #define LINUX_SA_NOMASK LINUX_SA_NODEFER 983ec12572Smanu #define LINUX_SA_ONESHOT LINUX_SA_RESETHAND 9953fb6703Smanu #define LINUX_SA_ALLBITS 0xfc000007 1003ec12572Smanu 101d359ae5cSchristos #define LINUX_MINSIGSTKSZ 2048 102d359ae5cSchristos 103f2af9174Sdsl typedef void (*linux_handler_t)(int); 1043ec12572Smanu 1053ec12572Smanu typedef unsigned long linux_old_sigset_t; 1063ec12572Smanu typedef struct { 1073ec12572Smanu unsigned long sig[LINUX__NSIG_WORDS]; 1083ec12572Smanu } linux_sigset_t; 1093ec12572Smanu 1103ec12572Smanu struct linux_old_sigaction { 111116bcb05Schristos linux_handler_t linux_sa_handler; 112116bcb05Schristos linux_old_sigset_t linux_sa_mask; 113116bcb05Schristos unsigned long linux_sa_flags; 114f2af9174Sdsl void (*linux_sa_restorer)(void); 1153ec12572Smanu }; 1163ec12572Smanu 1173ec12572Smanu /* Used in rt_* calls */ 1183ec12572Smanu struct linux_sigaction { 119116bcb05Schristos linux_handler_t linux_sa_handler; 120116bcb05Schristos unsigned long linux_sa_flags; 121f2af9174Sdsl void (*linux_sa_restorer)(void); 122116bcb05Schristos linux_sigset_t linux_sa_mask; 1233ec12572Smanu }; 1243ec12572Smanu 1253ec12572Smanu struct linux_k_sigaction { 1263ec12572Smanu struct linux_sigaction sa; 1273ec12572Smanu }; 1283ec12572Smanu 1293ec12572Smanu #define LINUX_SS_ONSTACK 1 1303ec12572Smanu #define LINUX_SS_DISABLE 2 1313ec12572Smanu 1323ec12572Smanu #define LINUX_MINSIGSTKSZ 2048 1333ec12572Smanu #define LINUX_SIGSTKSZ 8192 1343ec12572Smanu 1353ec12572Smanu struct linux_sigaltstack { 1363ec12572Smanu void *ss_sp; 1373ec12572Smanu int ss_flags; 1383ec12572Smanu size_t ss_size; 1393ec12572Smanu }; 140d1fd72fbSmanu typedef struct linux_sigaltstack linux_stack_t; 1413ec12572Smanu 1423ec12572Smanu #endif /* !_POWERPC_LINUX_SIGNAL_H */ 143