_sigset.h revision 127976
1193850Strasz/* 2193850Strasz * Copyright (c) 1982, 1986, 1989, 1991, 1993 3193850Strasz * The Regents of the University of California. All rights reserved. 4193850Strasz * (c) UNIX System Laboratories, Inc. 5193850Strasz * All or some portions of this file are derived from material licensed 6193850Strasz * to the University of California by American Telephone and Telegraph 7193850Strasz * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8193850Strasz * the permission of UNIX System Laboratories, Inc. 9193850Strasz * 10193850Strasz * Redistribution and use in source and binary forms, with or without 11193850Strasz * modification, are permitted provided that the following conditions 12193850Strasz * are met: 13193850Strasz * 1. Redistributions of source code must retain the above copyright 14193850Strasz * notice, this list of conditions and the following disclaimer. 15193850Strasz * 2. Redistributions in binary form must reproduce the above copyright 16193850Strasz * notice, this list of conditions and the following disclaimer in the 17193850Strasz * documentation and/or other materials provided with the distribution. 18193850Strasz * 4. Neither the name of the University nor the names of its contributors 19193850Strasz * may be used to endorse or promote products derived from this software 20193850Strasz * without specific prior written permission. 21193850Strasz * 22193850Strasz * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23193850Strasz * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24193850Strasz * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25193850Strasz * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26193850Strasz * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27193850Strasz * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28193850Strasz * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29193850Strasz * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30193850Strasz * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31193850Strasz * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32193850Strasz * SUCH DAMAGE. 33193850Strasz * 34193850Strasz * @(#)signal.h 8.4 (Berkeley) 5/4/95 35193850Strasz * $FreeBSD: head/sys/sys/_sigset.h 127976 2004-04-07 04:19:52Z imp $ 36193850Strasz */ 37193850Strasz 38193850Strasz#ifndef _SYS__SIGSET_H_ 39193850Strasz#define _SYS__SIGSET_H_ 40193850Strasz 41193850Strasz/* 42193850Strasz * sigset_t macros. 43193850Strasz */ 44193850Strasz#define _SIG_WORDS 4 45193850Strasz#define _SIG_MAXSIG 128 46193850Strasz#define _SIG_IDX(sig) ((sig) - 1) 47193850Strasz#define _SIG_WORD(sig) (_SIG_IDX(sig) >> 5) 48193850Strasz#define _SIG_BIT(sig) (1 << (_SIG_IDX(sig) & 31)) 49193850Strasz#define _SIG_VALID(sig) ((sig) <= _SIG_MAXSIG && (sig) > 0) 50193850Strasz 51193850Strasztypedef struct __sigset { 52193850Strasz __uint32_t __bits[_SIG_WORDS]; 53193850Strasz} __sigset_t; 54193850Strasz 55193850Strasz#if defined(_KERNEL) && defined(COMPAT_43) 56193850Strasztypedef unsigned int osigset_t; 57193850Strasz#endif 58193850Strasz 59193850Strasz#endif /* !_SYS__SIGSET_H_ */ 60193850Strasz