2018-05-09 16:56:15 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2018 Intel Corporation
|
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _CHANNELS_H
|
|
|
|
#define _CHANNELS_H
|
|
|
|
|
2018-05-09 18:06:40 +08:00
|
|
|
#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);
|
2018-05-09 16:56:15 +08:00
|
|
|
extern int init_channels(void);
|
|
|
|
|
2018-05-09 18:06:40 +08:00
|
|
|
|
2018-05-09 16:56:15 +08:00
|
|
|
#endif
|