Coherent4.2.10/include/signal.h

/* (-lgl
 *	Coherent 386 release 4.2
 *	Copyright (c) 1982, 1993 by Mark Williams Company.
 *	All rights reserved. May not be copied without permission.
 *	For copying permission and licensing info, write licensing@mwc.com
 -lgl) */

#ifndef	 __SIGNAL_H__
#define	 __SIGNAL_H__

#include <common/feature.h>
#include <common/ccompat.h>
#include <common/__pid.h>
#include <sys/signal.h>

typedef	long	sig_atomic_t;


__EXTERN_C_BEGIN__

__sighand_t   *	signal		__PROTO ((int _sig, __sighand_t * _func));
int		raise		__PROTO ((int _sig));

__sighand_t   *	sigset		__PROTO ((int _sig, __sighand_t * _func));
int		sighold		__PROTO ((int _sig));
int		sigignore	__PROTO ((int _sig));
int		sigrelse	__PROTO ((int _sig));
int		sigpause	__PROTO ((int _sig));

#if	! _STDC_SOURCE

int		kill		__PROTO ((__pid_t _pid, int _sig));
int		sigaction	__PROTO ((int _sig,
					  __CONST__ struct sigaction * _act,
					  struct sigaction * _oact));
int		sigaddset	__PROTO ((sigset_t * _set, int _signo));
int		sigdelset	__PROTO ((sigset_t * _set, int _signo));
int		sigemptyset	__PROTO ((sigset_t * _set));
int		sigfillset	__PROTO ((sigset_t * _set));
int		sigismember	__PROTO ((__CONST__ sigset_t * _set,
					  int _signo));
int		sigpending	__PROTO ((sigset_t * _set));
int		sigprocmask	__PROTO ((int _how,
					  __CONST__ sigset_t * _set,
					  sigset_t * _oset));
int		sigsuspend	__PROTO ((__CONST__ sigset_t * _sigmask));

#if	! _SYSV4

/*
 * Pre-SVR4 systems make these available as inlines. For us, this is optional
 * but still legal. For SVR4 systems, we require proper error checking. For
 * this to work, we depend on __SIGSET_UNIT (ss, n) not evaluating "n".
 */

#define	sigfillset(set)		((set)->_sigbits [0] = -1UL, 0)
#define	sigemptyset(set)	((set)->_sigbits [0] = 0)
#define	sigismember(set, signo)	((set)->_sigbits [0] & __SIGSET_MASK (signo))
#define sigaddset(set, signo)	((set)->_sigbits [0] |= \
					__SIGSET_MASK (signo), 0)
#define	sigdelset(set, signo)	((set)->_sigbits [0] &= \
					~ __SIGSET_MASK (signo), 0)

#endif	/* ! _SYSV4 */

#endif	/* ! _STDC_SOURCE */

__EXTERN_C_END__

#endif	/* ! defined (__SIGNAL_H__) */