summaryrefslogtreecommitdiff
path: root/source/module/monitor_timer.h
diff options
context:
space:
mode:
authorzy <[email protected]>2023-12-19 22:28:35 -0500
committerzy <[email protected]>2023-12-19 22:28:35 -0500
commitf2c70efbd56c62e75f449648e216fb6187265443 (patch)
tree9ff624118164c6869e1784a019b8338bb43647b9 /source/module/monitor_timer.h
parent46a03f035758dd6d379338c6b0f24c3fda475afe (diff)
kernel_watch_timer add *task
Diffstat (limited to 'source/module/monitor_timer.h')
-rw-r--r--source/module/monitor_timer.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/module/monitor_timer.h b/source/module/monitor_timer.h
index c8b5df5..5b522d7 100644
--- a/source/module/monitor_timer.h
+++ b/source/module/monitor_timer.h
@@ -32,6 +32,8 @@ typedef struct {
unsigned long long time_ns; // hrTimer time interval (ns)
struct hrtimer hr_timer; // hrTimer
ktime_t kt; // hrTimer time
+ struct task_struct *task; // task pointer
+ // one timer one task(process)
unsigned sentinel; // sentinel
kernel_watch_arg
k_watch_args[TIMER_MAX_WATCH_NUM]; // all watched kernel_watch_arg
@@ -40,8 +42,6 @@ typedef struct {
int threshold_buffer[TIMER_MAX_WATCH_NUM]; //
struct work_struct wk; // for handle
unsigned long long tv; // time
- struct task_struct *task; // task pointer
- // one timer one task(process)
} kernel_watch_timer;
// Global variable
@@ -59,7 +59,7 @@ unsigned char del_all_kwarg_by_pid(pid_t pid);
#define TIMER_CANCEL(timer) (hrtimer_cancel(&timer->hr_timer))
// for timer
-kernel_watch_timer *get_timer(unsigned long long time_ns);
+kernel_watch_timer *get_timer(pid_t tid, unsigned long long time_ns);
unsigned char timer_add_watch(kernel_watch_timer *timer,
kernel_watch_arg k_watch_arg);
unsigned char timer_del_watch_by_pid(kernel_watch_timer *timer, pid_t pid);