uapi: getpid -> gettid
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user