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 * A copy of the CDDL is also available via the Internet at 15 * http://www.opensource.org/licenses/cddl1.txt 16 * 17 * When distributing Covered Code, include this CDDL HEADER in each 18 * file and include the License file CDDL.Schily.txt from this distribution. 19 */ 20 21 #ifndef _SCHILY_SIGBLK_H 22 #define _SCHILY_SIGBLK_H 23 24 #ifndef _SCHILY_MCONFIG_H 25 #include <schily/mconfig.h> 26 #endif 27 28 #ifdef __cplusplus 29 extern "C" { 30 #endif 31 32 typedef struct sigblk { 33 long **sb_savfp; /* Real saved framepointer */ 34 struct sigblk *sb_signext; /* Next sw signal blk for this func */ 35 short sb_siglen; /* Strlen for sb_signame */ 36 const char *sb_signame; /* Name of software signal */ 37 38 /* sb_sigfun: function to call */ 39 int (*sb_sigfun) __PR((const char *, long, long)); 40 41 long sb_sigarg; /* Second arg for sb_sigfun */ 42 } SIGBLK; 43 44 /* 45 * The handler function is called with three arguments: 46 * 47 * 1) The name of the software signal 48 * 2) The argument from the handlecond() call 49 * 3) The argument from the raisecond() call 50 */ 51 typedef int (*handlefunc_t) __PR((const char *, long, long)); 52 53 extern void handlecond __PR((const char *, SIGBLK *, 54 int(*)(const char *, long, long), 55 long)); 56 extern void raisecond __PR((const char *, long)); 57 extern void starthandlecond __PR((SIGBLK *)); 58 extern void unhandlecond __PR((SIGBLK *)); 59 60 #ifdef __cplusplus 61 } 62 #endif 63 64 #endif /* _SCHILY_SIGBLK_H */ 65