add workqueue
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include <linux/hrtimer.h>
|
||||
#include <linux/workqueue.h>
|
||||
|
||||
#define MAX_TIMER_NUM (128) // max timer number
|
||||
#define TIMER_MAX_WATCH_NUM (32) // A timer max watch number at once time
|
||||
@@ -33,6 +34,10 @@ typedef struct {
|
||||
unsigned sentinel; // sentinel
|
||||
kernel_watch_arg
|
||||
k_watch_args[TIMER_MAX_WATCH_NUM]; // all watched kernel_watch_arg
|
||||
int threshold_num; // all over threshold number,
|
||||
// 0 means no handle needed
|
||||
int threshold_buffer[TIMER_MAX_WATCH_NUM]; //
|
||||
struct work_struct wk; // for handle
|
||||
} kernel_watch_timer;
|
||||
|
||||
// Global variable
|
||||
|
||||
Reference in New Issue
Block a user