summaryrefslogtreecommitdiff
path: root/source/uapi/monitor_user.h
diff options
context:
space:
mode:
authorzy <[email protected]>2023-11-27 04:21:47 -0500
committerzy <[email protected]>2023-11-27 04:21:47 -0500
commit7e3b4ded0ccfe149a96aec009836bcb35293fb63 (patch)
tree91174e3ddef6bc0133b5f5eaab5a6124701fd2a2 /source/uapi/monitor_user.h
parenta56fa77dc824132c8df064c3398414ffaa0eedc6 (diff)
watch_arg: greater_flag -> above_threshold
Diffstat (limited to 'source/uapi/monitor_user.h')
-rw-r--r--source/uapi/monitor_user.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/source/uapi/monitor_user.h b/source/uapi/monitor_user.h
index f4d9df1..257217f 100644
--- a/source/uapi/monitor_user.h
+++ b/source/uapi/monitor_user.h
@@ -1,7 +1,13 @@
+#ifndef UAPI_MONITOR_H
+#define UAPI_MONITOR_H
// monitor_interface.h
+#include "monitor_user_sw.h"
+#include <string.h>
#include <sys/types.h>
+#include <unistd.h>
#define MAX_NAME_LEN (15) // max name length
+
typedef struct {
pid_t task_id; // current process id
char name[MAX_NAME_LEN + 1]; // name
@@ -9,12 +15,18 @@ typedef struct {
int length_byte; // byte
long long threshold; // threshold value
unsigned char unsigned_flag; // unsigned flag (true: unsigned, false: signed)
- unsigned char greater_flag; // reverse flag (true: >, false: <)
+ unsigned char above_threshold; // reverse flag (true: >, false: <)
unsigned long time_ns; // timer interval (ns)
} watch_arg;
+void init_watch_arg(watch_arg *wg, char *name, void *ptr, int length_byte,
+ long long threshold, unsigned char unsigned_flag,
+ unsigned char above_threshold, unsigned long time_ns);
+
// start watch
int start_watch(watch_arg w_arg);
// cancel watch
-int cancel_watch(void); \ No newline at end of file
+int cancel_watch(void);
+
+#endif \ No newline at end of file