IOCTL_PID

This commit is contained in:
zy
2023-12-05 00:48:37 -05:00
parent 16beb60e94
commit 6accd46ac7
3 changed files with 28 additions and 24 deletions

View File

@@ -4,9 +4,13 @@
#include "monitor_timer.h"
#include "monitor_trace.h"
#include <linux/ioctl.h> // for ioctl
// ioctl
#define IOCTL_MAGIC_NUMBER 'k'
#define IOCTL_WATCH_VARIABLE 0
#define IOCTL_DUMP_LOG 1
#define IOCTL_PID _IOWR(IOCTL_MAGIC_NUMBER, 2, int)
// default value
extern int def_interval_ns;
@@ -24,4 +28,4 @@ void clear_watch(pid_t pid); // for release
enum hrtimer_restart
check_variable_cb(struct hrtimer *timer); // hrtimer callback
int diag_test(int nid); // for test
int diag_pid(int pid); // for test