summaryrefslogtreecommitdiff
path: root/mit-pthreads/machdep/sco-3.2v5/__signal.h
blob: 6a33d37a261191cd3cb9c5347de1aca8b2ed0ee5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
/* Copyright 1994-1995 The Santa Cruz Operation, Inc. All Rights Reserved. */


#if defined(_NO_PROTOTYPE)	/* Old, crufty environment */
#include <sys/oldstyle/signal.h>
#elif defined(_XOPEN_SOURCE) || defined(_XPG4_VERS)	/* Xpg4 environment */
#include <xpg4/signal.h>
#elif defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) /* Posix environment */
#include <sys/posix/__signal.h>
#elif _STRICT_ANSI 	/* Pure Ansi/ISO environment */
#include <sys/ansi/signal.h>
#elif defined(_SCO_ODS_30) /* Old, Tbird compatible environment */
#include <sys/ods_30_compat/signal.h>
#else 	/* Normal, default environment */
/*
 *   Portions Copyright (C) 1983-1995 The Santa Cruz Operation, Inc.
 *		All Rights Reserved.
 *
 *	The information in this file is provided for the exclusive use of
 *	the licensees of The Santa Cruz Operation, Inc.  Such users have the
 *	right to use, modify, and incorporate this code into other products
 *	for purposes authorized by the license agreement provided they include
 *	this notice and the associated copyright notice with any such product.
 *	The information in this file is provided "AS IS" without warranty.
 */

/*	Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
/*	Portions Copyright (c) 1979 - 1990 AT&T   */
/*	  All Rights Reserved   */

/*	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF          */
/*	UNIX System Laboratories, Inc.                          */
/*	The copyright notice above does not evidence any        */
/*	actual or intended publication of such source code.     */

#ifndef ___SIGNAL_H
#define ___SIGNAL_H

#pragma comment(exestr, "xpg4plus @(#) signal.h 20.3 94/12/19 ")

#ifndef _SIG_ATOMIC_T
#define _SIG_ATOMIC_T
   /* atomic entity for signal handling  */
typedef int sig_atomic_t;
#endif

extern const char * const _sys_siglist[];
extern const int _sys_nsig;

#ifndef	_SYS_SIGNAL_H
#include <sys/signal.h>
#endif

#define SignalBad		((SignalHandler)-1)
#define SignalDefault	((SignalHandler)0)
#define SignalIgnore	((SignalHandler)1)

#define	__sigmask(sig)		(1 << ((sig) - 1))
#define __SIGEMPTYSET	(~SIGALL)
#define	__SIGFILLSET	SIGALL
#define	__SIGADDSET(s,n)	((*s) |= (__sigmask(n)))
#define	__SIGDELSET(s,n)	((*s) &= ~(__sigmask(n))) 
#define	__SIGISMEMBER(s,n)	((*s) & (__sigmask(n))) 

#if !defined(_SYS_TYPES_H)
#include <sys/types.h>
#endif


#if __cplusplus
extern "C" {
#endif 

extern void (*signal(int, void(*)(int)))(int);
extern int raise(int);

extern void (*bsd_signal(int, void(*)(int)))(int);
extern  int ( *ssignal( int, int(*)(int) ) )(int);
extern  void ( *sigset( int, void(*)(int) ) )(int);
extern int killpg(pid_t, int);
#ifdef SS_ONSTACK	/* Not defined on old versions of the OS */
extern int sigaltstack(const stack_t *, stack_t *);
extern int sigstack(struct sigstack *, struct sigstack *);
#endif
extern int sighold(int);
extern int sigignore(int);
extern int siginterrupt(int, int);
extern int sigpause(int);
extern int sigrelse(int);

extern int (sigfillset)(sigset_t *);
extern int (sigemptyset)(sigset_t *);
extern int (sigaddset)(sigset_t *, int);
extern int (sigdelset)(sigset_t *, int);
extern int (sigismember)(const sigset_t *, int);
extern int sigpending(sigset_t *);
extern int sigsuspend(const sigset_t *);
extern int sigprocmask(int, const sigset_t *, sigset_t *);
extern int kill(pid_t, int);
extern int sigaction(int, const struct sigaction *, struct sigaction *);

#if __cplusplus
};
#endif 


#endif /* ___SIGNAL_H  */

#endif