1 #ifndef MP_SIGNALS_H
2 #define MP_SIGNALS_H
3 
4 
5 /*
6  * mpatrol
7  * A library for controlling and tracing dynamic memory allocations.
8  * Copyright (C) 1997-2002 Graeme S. Roy <graeme.roy@analog.com>
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Library General Public
12  * License as published by the Free Software Foundation; either
13  * version 2 of the License, or (at your option) any later version.
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  * Library General Public License for more details.
19  *
20  * You should have received a copy of the GNU Library General Public
21  * License along with this library; if not, write to the Free
22  * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23  * MA 02111-1307, USA.
24  */
25 
26 
27 /*
28  * Signal-handling.  The setting of signal-handlers and their actions
29  * is controlled from this module.
30  */
31 
32 
33 /*
34  * $Id: signals.h,v 1.8 2002/01/08 20:13:59 graeme Exp $
35  */
36 
37 
38 #include "config.h"
39 
40 
41 /* A sighead structure contains details about the current status of signal
42  * handlers.
43  */
44 
45 typedef struct sighead
46 {
47     void (*sigint)(int);  /* interrupt signal handler */
48     void (*sigterm)(int); /* termination signal handler */
49     char saved;           /* signal handlers have been saved */
50 }
51 sighead;
52 
53 
54 #ifdef __cplusplus
55 extern "C"
56 {
57 #endif /* __cplusplus */
58 
59 
60 MP_EXPORT void __mp_initsignals(sighead *);
61 MP_EXPORT void __mp_savesignals(sighead *);
62 MP_EXPORT void __mp_restoresignals(sighead *);
63 MP_EXPORT void __mp_abort(void);
64 
65 
66 #ifdef __cplusplus
67 }
68 #endif /* __cplusplus */
69 
70 
71 #endif /* MP_SIGNALS_H */
72