diff options
| author | zy <[email protected]> | 2023-11-16 13:11:45 +0800 |
|---|---|---|
| committer | zy <[email protected]> | 2023-11-16 13:11:45 +0800 |
| commit | 4c63686513c0cce1b64f7aca2d6a9f2a2a379e98 (patch) | |
| tree | d6e6d5c09c01e0d1f539cd1941f1e65bbe36c7e0 /user/monitor_user.h | |
| parent | b0365d12e761d268e47881c4a218681e78da3221 (diff) | |
Diffstat (limited to 'user/monitor_user.h')
| -rw-r--r-- | user/monitor_user.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/user/monitor_user.h b/user/monitor_user.h new file mode 100644 index 0000000..f4d9df1 --- /dev/null +++ b/user/monitor_user.h @@ -0,0 +1,20 @@ +// monitor_interface.h +#include <sys/types.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 + void *ptr; // virtual address + 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 long time_ns; // timer interval (ns) +} watch_arg; + +// start watch +int start_watch(watch_arg w_arg); + +// cancel watch +int cancel_watch(void);
\ No newline at end of file |
