add delay
This commit is contained in:
@@ -99,7 +99,13 @@ static long device_ioctl(struct file *file, unsigned int ioctl_num,
|
||||
case IOCTL_PID:
|
||||
printk(KERN_INFO "variable_monitor PID\n");
|
||||
ret = copy_from_user(&wid, (ioctl_id *)ioctl_param, sizeof(ioctl_id));
|
||||
diag_pid(wid.id);
|
||||
if (ret) {
|
||||
printk(KERN_INFO "copy_from_user failed\n");
|
||||
}
|
||||
ret = diag_pid(wid.id);
|
||||
if (ret) {
|
||||
printk(KERN_INFO "diag_pid failed\n");
|
||||
}
|
||||
break;
|
||||
case IOCTL_TGID:
|
||||
printk(KERN_INFO "variable_monitor TGID\n");
|
||||
@@ -187,6 +193,8 @@ void cleanup_module(void) {
|
||||
class_destroy(watch_class);
|
||||
cdev_del(watch_cdev);
|
||||
unregister_chrdev_region(dev_num, 1);
|
||||
|
||||
cleanup_perf_event(); // just for perf test
|
||||
}
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
Reference in New Issue
Block a user