signal.h revision 9343
10SN/A/*- 20SN/A * Copyright (c) 1991, 1993 30SN/A * The Regents of the University of California. All rights reserved. 40SN/A * 50SN/A * Redistribution and use in source and binary forms, with or without 62362SN/A * modification, are permitted provided that the following conditions 70SN/A * are met: 82362SN/A * 1. Redistributions of source code must retain the above copyright 90SN/A * notice, this list of conditions and the following disclaimer. 100SN/A * 2. Redistributions in binary form must reproduce the above copyright 110SN/A * notice, this list of conditions and the following disclaimer in the 120SN/A * documentation and/or other materials provided with the distribution. 130SN/A * 3. All advertising materials mentioning features or use of this software 140SN/A * must display the following acknowledgement: 150SN/A * This product includes software developed by the University of 160SN/A * California, Berkeley and its contributors. 170SN/A * 4. Neither the name of the University nor the names of its contributors 180SN/A * may be used to endorse or promote products derived from this software 190SN/A * without specific prior written permission. 202362SN/A * 212362SN/A * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 222362SN/A * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 230SN/A * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 240SN/A * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 250SN/A * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 260SN/A * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 270SN/A * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 280SN/A * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 290SN/A * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 300SN/A * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 310SN/A * SUCH DAMAGE. 320SN/A * 333984SN/A * @(#)signal.h 8.3 (Berkeley) 3/30/94 340SN/A */ 350SN/A 360SN/A#ifndef _SIGNAL_H_ 3712876Sdl#define _SIGNAL_H_ 3815088Sdl 3915088Sdl#include <sys/cdefs.h> 407854SN/A#include <sys/signal.h> 417623SN/A#include <machine/ansi.h> 427623SN/A 437623SN/A#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) 447623SN/Aextern __const char *__const sys_signame[NSIG]; 457623SN/Aextern __const char *__const sys_siglist[NSIG]; 467623SN/A#endif 477623SN/A 487623SN/A__BEGIN_DECLS 497623SN/Aint raise __P((int)); 507623SN/A#ifndef _ANSI_SOURCE 517623SN/Aint kill __P((_BSD_PID_T_, int)); 527623SN/Aint sigaction __P((int, const struct sigaction *, struct sigaction *)); 537623SN/Aint sigaddset __P((sigset_t *, int)); 547623SN/Aint sigdelset __P((sigset_t *, int)); 557623SN/Aint sigemptyset __P((sigset_t *)); 5612876Sdlint sigfillset __P((sigset_t *)); 577623SN/Aint sigismember __P((const sigset_t *, int)); 587623SN/Aint sigpending __P((sigset_t *)); 597623SN/Aint sigprocmask __P((int, const sigset_t *, sigset_t *)); 6011898Spsandozint sigsuspend __P((const sigset_t *)); 610SN/A#ifndef _POSIX_SOURCE 620SN/Aint killpg __P((_BSD_PID_T_, int)); 630SN/Aint sigblock __P((int)); 640SN/Aint siginterrupt __P((int, int)); 650SN/Aint sigpause __P((int)); 660SN/Aint sigreturn __P((struct sigcontext *)); 670SN/Aint sigsetmask __P((int)); 680SN/Aint sigstack __P((const struct sigstack *, struct sigstack *)); 693735SN/Aint sigvec __P((int, struct sigvec *, struct sigvec *)); 703735SN/Avoid psignal __P((unsigned int, const char *)); 717623SN/A#endif /* !_POSIX_SOURCE */ 727623SN/A#endif /* !_ANSI_SOURCE */ 730SN/A__END_DECLS 747904SN/A 757904SN/A#ifndef _ANSI_SOURCE 767904SN/A/* List definitions after function declarations, or Reiser cpp gets upset. */ 777904SN/A#define sigaddset(set, signo) (*(set) |= 1 << ((signo) - 1), 0) 787904SN/A#define sigdelset(set, signo) (*(set) &= ~(1 << ((signo) - 1)), 0) 797904SN/A#define sigemptyset(set) (*(set) = 0, 0) 807904SN/A#define sigfillset(set) (*(set) = ~(sigset_t)0, 0) 810SN/A#define sigismember(set, signo) ((*(set) & (1 << ((signo) - 1))) != 0) 827623SN/A#endif /* !_ANSI_SOURCE */ 830SN/A 847623SN/A#endif /* !_SIGNAL_H_ */ 850SN/A