当前位置: 技术问答>linux和unix
系统函数__put_usr copy_to_usr()
来源: 互联网 发布时间:2015-07-08
本文导语: 系统函数在我用 ksyms看 自己没的情况下 我怎样实现该函数功能呢?(请以上面函数为例子) | 使用KERNEL API,你可以找一份内核API查询 以下关于put_user的用法来自内核API put_user Name put_user -- Write a simple v...
系统函数在我用 ksyms看 自己没的情况下
我怎样实现该函数功能呢?(请以上面函数为例子)
我怎样实现该函数功能呢?(请以上面函数为例子)
|
使用KERNEL API,你可以找一份内核API查询
以下关于put_user的用法来自内核API
put_user
Name
put_user -- Write a simple value into user space.
Synopsis
put_user ( x, ptr);
Arguments
x
Value to copy to user space.
ptr
Destination address, in user space.
Context
User context only. This function may sleep.
Description
This macro copies a single simple value from kernel space to user space. It supports simple types like char and int, but not larger data types like structures or arrays.
ptr must have pointer-to-simple-variable type, and x must be assignable to the result of dereferencing ptr.
Returns zero on success, or -EFAULT on error.
以下关于put_user的用法来自内核API
put_user
Name
put_user -- Write a simple value into user space.
Synopsis
put_user ( x, ptr);
Arguments
x
Value to copy to user space.
ptr
Destination address, in user space.
Context
User context only. This function may sleep.
Description
This macro copies a single simple value from kernel space to user space. It supports simple types like char and int, but not larger data types like structures or arrays.
ptr must have pointer-to-simple-variable type, and x must be assignable to the result of dereferencing ptr.
Returns zero on success, or -EFAULT on error.
|
copy_from_user
copy_to_user
copy_to_user
|
vi my.c
__put_user()
shift+k
__put_user()
shift+k
|
不知所云。讲清楚点