mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-12 20:39:59 +00:00
tools: acrn-crashlog: channel module for acrnprobe
The channel represents a way of detecting the system's events. So far, there are 3 channels: 1. oneshot, detect once while acrnprobe startup. 2. polling, run a detecting job with fixed time interval. 3. inotify, watch the change of file or dir. Signed-off-by: Liu Xinwu <xinwu.liu@intel.com> Reviewed-by: Zhang Yanmin <yanmin.zhang@intel.com> Reviewed-by: Liu Chuansheng <chuansheng.liu@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com> Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com> Acked-by: Eddie Dong <Eddie.dong@intel.com>
This commit is contained in:
@@ -6,6 +6,19 @@
|
||||
#ifndef _CHANNELS_H
|
||||
#define _CHANNELS_H
|
||||
|
||||
#define BASE_DIR_MASK (IN_CLOSE_WRITE | IN_DELETE_SELF | IN_MOVE_SELF)
|
||||
#define UPTIME_MASK IN_CLOSE_WRITE
|
||||
#define MAXEVENTS 15
|
||||
#define HEART_RATE (6 * 1000) /* ms */
|
||||
|
||||
struct channel_t {
|
||||
char *name;
|
||||
int fd;
|
||||
void (*channel_fn)(struct channel_t *);
|
||||
};
|
||||
extern int create_detached_thread(pthread_t *pid,
|
||||
void *(*fn)(void *), void *arg);
|
||||
extern int init_channels(void);
|
||||
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user