This is Unofficial EPICS BASE Doxygen Site
taskwd.h
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2008 UChicago Argonne LLC, as Operator of Argonne
3 * National Laboratory.
4 * Copyright (c) 2002 The Regents of the University of California, as
5 * Operator of Los Alamos National Laboratory.
6 * EPICS BASE is distributed subject to a Software License Agreement found
7 * in file LICENSE that is included with this distribution.
8 \*************************************************************************/
9 
10 /* General purpose task watchdog */
11 /*
12  * Original Author: Marty Kraimer
13  * Date: 07-18-91
14 */
15 
16 #ifndef INC_taskwd_H
17 #define INC_taskwd_H
18 
19 #include "epicsThread.h"
20 #include "libComAPI.h"
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 
27 /* Initialization, optional */
28 LIBCOM_API void taskwdInit(void);
29 
30 
31 /* For tasks to be monitored */
32 typedef void (*TASKWDFUNC)(void *usr);
33 
34 LIBCOM_API void taskwdInsert(epicsThreadId tid,
35  TASKWDFUNC callback, void *usr);
36 LIBCOM_API void taskwdRemove(epicsThreadId tid);
37 
38 
39 /* Monitoring API */
40 typedef struct {
41  void (*insert)(void *usr, epicsThreadId tid);
42  void (*notify)(void *usr, epicsThreadId tid, int suspended);
43  void (*remove)(void *usr, epicsThreadId tid);
45 
46 LIBCOM_API void taskwdMonitorAdd(const taskwdMonitor *funcs, void *usr);
47 LIBCOM_API void taskwdMonitorDel(const taskwdMonitor *funcs, void *usr);
48 
49 
50 /* Old monitoring API, deprecated */
51 typedef void (*TASKWDANYFUNC)(void *usr, epicsThreadId tid);
52 
53 LIBCOM_API void taskwdAnyInsert(void *key,
54  TASKWDANYFUNC callback, void *usr);
55 LIBCOM_API void taskwdAnyRemove(void *key);
56 
57 
58 /* Report function */
59 LIBCOM_API void taskwdShow(int level);
60 
61 
62 #ifdef __cplusplus
63 }
64 #endif
65 
66 #endif /* INC_taskwd_H */
LIBCOM_API void taskwdAnyRemove(void *key)
Definition: taskwd.c:328
LIBCOM_API void taskwdInit(void)
Definition: taskwd.c:167
LIBCOM_API void taskwdMonitorDel(const taskwdMonitor *funcs, void *usr)
Definition: taskwd.c:265
Definition: caget.c:48
LIBCOM_API void taskwdInsert(epicsThreadId tid, TASKWDFUNC callback, void *usr)
Definition: taskwd.c:176
void(* TASKWDANYFUNC)(void *usr, epicsThreadId tid)
Definition: taskwd.h:51
LIBCOM_API void taskwdRemove(epicsThreadId tid)
Definition: taskwd.c:206
void(* TASKWDFUNC)(void *usr)
Definition: taskwd.h:32
LIBCOM_API void taskwdMonitorAdd(const taskwdMonitor *funcs, void *usr)
Definition: taskwd.c:248
C++ and C descriptions for a thread.
LIBCOM_API void taskwdShow(int level)
Definition: taskwd.c:358
LIBCOM_API void taskwdAnyInsert(void *key, TASKWDANYFUNC callback, void *usr)
Definition: taskwd.c:305