copy_to_user,copy_from_use…
来源:互联网 发布:返利网是淘宝客吗 编辑:程序博客网 时间:2024/05/24 05:48
copy_to_user,copy_from_user,get_user,put_user函数比较
copy_to_user-- Copy a block of data into user space.
copy_from_user-- Copy a block of data from user space.
get_user-- Get a simplevariable from user space.
put_user-- Write a simple value into user space.
copy_from_user
Name
copy_from_user-- Copy a block of data from user space.Synopsis
unsigned long copy_from_user
(void *to, const void __user * from, unsigned longn);Arguments
- to
Destinationaddress, in kernel space.
- from
Sourceaddress, in user space.
- n
Number ofbytes to copy.
Context
User contextonly. This function may sleep.
Description
Copy datafrom user space to kernel space.
Returnsnumber of bytes that could not be copied. On success, this will bezero.
If some datacould not be copied, this function will pad the copied data to therequested size using zero bytes.
copy_to_user
Name
copy_to_user --Copy a block of data into user space.Synopsis
unsigned long copy_to_user
(void__user * to, const void * from, unsigned longn);Arguments
- to
Destinationaddress, in user space.
- from
Sourceaddress, in kernel space.
- n
Number ofbytes to copy.
Context
User contextonly. This function may sleep.
Description
Copy datafrom kernel space to user space.
Returnsnumber of bytes that could not be copied. On success, this will bezero.
put_user
Name
put_user --Write a simple value into user space.Synopsis
put_user
( x,ptr);Arguments
- x
Value tocopy to user space.
- ptr
Destinationaddress, in user space.
Context
User contextonly. This function may sleep.
Description
This macrocopies a single simple value from kernel space to user space. Itsupports simple types like char and int, but not larger data typeslike structures or arrays.
ptr musthave pointer-to-simple-variable type, and x must be assignable tothe result of dereferencing ptr.
Returns zeroon success, or -EFAULT on error.
get_user
Name
get_user -- Geta simple variable from user space.Synopsis
get_user
( x,ptr);Arguments
- x
Variable tostore result.
- ptr
Sourceaddress, in user space.
Context
User contextonly. This function may sleep.
Description
This macrocopies a single simple variable from user space to kernel space. Itsupports simple types like char and int, but not larger data typeslike structures or arrays.
ptr musthave pointer-to-simple-variable type, and the result ofdereferencing ptr must be assignable to x without acast.
Returns zeroon success, or -EFAULT on error. On error, the variable x is set tozero.
- copy_to_user,copy_from_use…
- copy_to_user 与 copy_from_use
- copy_to_user、copy_from_us…
- copy_to_user
- copy_to_user
- copy_to_user、copy_from_user
- copy_from_user && copy_to_user
- copy_to_user 错误
- copy_to_user()函数
- copy_to_user()分析
- 内核函数 copy_to_user
- copy_to_user和copy_from_user函数
- copy_to_user 和 copy_from_user
- copy_to_user的使用失误
- copy_to_user()函数分析
- copy_to_user和copy_from_user
- copy_to_user()函数分析
- copy_from_user and copy_to_user
- linux下的nrf24l01驱动程序
- windows下的文本文件在linux下查看,中文显示乱码
- linux登录密码忘记,教你怎样破解
- QT编程No such slot的解决方…
- Copy_from&to_user详解 转载
- copy_to_user,copy_from_use…
- 在oracle数据库中插入含有&符号的字符串
- IAR for ARM 6.20 完美破解
- minicom的使用方法
- vivi linux2.6移植笔记
- Arm-linux下USB摄像头的视频…
- EditPlus3注册码
- 程序员修身养性的十大原则
- 献给我的爱机——google nexus s