https://archive.kernel.org/oldlinux/htmldocs/kernel-api/API-cdev-init.html
-
put_user(type val, type *address)#include <asm/uaccess.h>- store the value
valto user space addressaddress - type can be 8, 16, 32, 64 bit (depends on hardware)
-
get_user(type val, type *address)#include <asm/uaccess.h>- get the value
valfrom user space addressaddress
-
unsigned long copy_to_user(void __user *to, const void *from, unsigned long n)#include <linux/uaccess.h>- copy
nbytes from kernel-space to user-space
-
unsigned long copy_from_user(void *to, const void __user *from, unsigned long n)#include <linux/uaccess.h>- copy
nbytes from user-space to kernel-space