This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
zhangyang-variable-monitor/source/uapi/monitor_user.h
2023-11-16 14:07:26 +08:00

20 lines
644 B
C

// 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);