1 /* @(#)sigblk.h	1.12 08/12/24 Copyright 1985, 1995-2008 J. Schilling */
2 /*
3  *	software signal block definition
4  *
5  *	Copyright (c) 1985, 1995-2008 J. Schilling
6  */
7 /*
8  * The contents of this file are subject to the terms of the
9  * Common Development and Distribution License, Version 1.0 only
10  * (the "License").  You may not use this file except in compliance
11  * with the License.
12  *
13  * See the file CDDL.Schily.txt in this distribution for details.
14  *
15  * When distributing Covered Code, include this CDDL HEADER in each
16  * file and include the License file CDDL.Schily.txt from this distribution.
17  */
18 
19 #ifndef	_SCHILY_SIGBLK_H
20 #define	_SCHILY_SIGBLK_H
21 
22 #ifndef _SCHILY_MCONFIG_H
23 #include <schily/mconfig.h>
24 #endif
25 
26 #ifdef	__cplusplus
27 extern "C" {
28 #endif
29 
30 typedef struct sigblk {
31 	long		**sb_savfp;	/* Real saved framepointer	*/
32 	struct sigblk	*sb_signext;	/* Next sw signal blk for this func */
33 	short		sb_siglen;	/* Strlen for sb_signame	*/
34 	const char	*sb_signame;	/* Name of software signal	*/
35 
36 					/* sb_sigfun: function to call	*/
37 	int		(*sb_sigfun)	__PR((const char *, long, long));
38 
39 	long		sb_sigarg;	/* Second arg for sb_sigfun	*/
40 } SIGBLK;
41 
42 /*
43  * The handler function is called with three arguments:
44  *
45  *	1)	The name of the software signal
46  *	2)	The argument from the handlecond() call
47  *	3)	The argument from the raisecond() call
48  */
49 typedef	int	(*handlefunc_t)		__PR((const char *, long, long));
50 
51 extern	void	handlecond		__PR((const char *, SIGBLK *,
52 					    int(*)(const char *, long, long),
53 									long));
54 extern	void	raisecond		__PR((const char *, long));
55 extern	void	starthandlecond		__PR((SIGBLK *));
56 extern	void	unhandlecond		__PR((SIGBLK *));
57 
58 #ifdef	__cplusplus
59 }
60 #endif
61 
62 #endif	/* _SCHILY_SIGBLK_H */
63