当前位置: 技术问答>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
|
不知所云。讲清楚点
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。