diff options
Diffstat (limited to 'source/uapi/monitor_user.c')
| -rw-r--r-- | source/uapi/monitor_user.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/uapi/monitor_user.c b/source/uapi/monitor_user.c index 9305675..1a90008 100644 --- a/source/uapi/monitor_user.c +++ b/source/uapi/monitor_user.c @@ -42,3 +42,17 @@ int cancel_watch() { file_desc = -1; return 0; } + +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){ + wg->task_id = getpid(); + strncpy(wg->name, name, (MAX_NAME_LEN + 1)); + wg->ptr = ptr; + wg->length_byte = length_byte; + wg->threshold = threshold; + wg->unsigned_flag = unsigned_flag; + wg->above_threshold = above_threshold; + wg->time_ns = time_ns; +} |
