summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorzy <[email protected]>2023-12-19 22:19:25 -0500
committerzy <[email protected]>2023-12-19 22:19:25 -0500
commitb1c831d63d5f53e6baa1d3ad1420094b55e3d802 (patch)
treef53be124ec135acc9df39bffcd97d62563fda850 /source
parent357df1be9c0c614fe8b2f0d288a500ed37d66916 (diff)
uapi: getpid -> gettid
Diffstat (limited to 'source')
-rw-r--r--source/uapi/monitor_user.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/uapi/monitor_user.c b/source/uapi/monitor_user.c
index be78e5a..4188136 100644
--- a/source/uapi/monitor_user.c
+++ b/source/uapi/monitor_user.c
@@ -2,6 +2,7 @@
#include <fcntl.h>
#include <stdio.h>
#include <sys/ioctl.h>
+#include <sys/syscall.h>
#include <unistd.h>
#define DEVICE "/dev/variable_monitor"
@@ -43,11 +44,10 @@ int cancel_watch() {
return 0;
}
-void init_watch_arg(watch_arg *wg, char *name, void *ptr,
- int length_byte, long long threshold,
- unsigned char is_unsigned,
- unsigned char above_threshold, unsigned long time_ns){
- wg->task_id = getpid();
+void init_watch_arg(watch_arg *wg, char *name, void *ptr, int length_byte,
+ long long threshold, unsigned char is_unsigned,
+ unsigned char above_threshold, unsigned long time_ns) {
+ wg->task_id = gettid();
strncpy(wg->name, name, (MAX_NAME_LEN + 1));
wg->ptr = ptr;
wg->length_byte = length_byte;