]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/lib/watchdog.h
57f9d677b3b9e91f109e9a48f056c8f6212cd1c9
[bacula/bacula] / bacula / src / lib / watchdog.h
1 /*
2  * Watchdog timer routines
3  * 
4  *    Kern Sibbald, December MMII
5  *
6 */
7 /*
8    Copyright (C) 2002 Kern Sibbald and John Walker
9
10    This program is free software; you can redistribute it and/or
11    modify it under the terms of the GNU General Public License as
12    published by the Free Software Foundation; either version 2 of
13    the License, or (at your option) any later version.
14
15    This program 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    General Public License for more details.
19
20    You should have received a copy of the GNU General Public
21    License along with this program; 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 #define TYPE_CHILD   1
28 #define TYPE_PTHREAD 2
29
30 typedef struct s_btimer_t {
31    struct s_btimer_t *next;
32    struct s_btimer_t *prev;
33    time_t start_time;
34    int32_t  wait;
35    pid_t pid;                         /* process id if TYPE_CHILD */
36    int killed;
37    int type;
38    pthread_t tid;                     /* thread id if TYPE_PTHREAD */
39 } btimer_t;
40
41 #define btimer_id btimer_t *