[英]Current macro in linux kernel
The purpose of the current macro is to find a pointer to the task structure of the currently running process. 当前宏的目的是找到指向当前正在运行的进程的任务结构的指针。
So regarding its usage when developing a kernel module, and according to its definition does this macro return the PID of the current running user-space process or what? 关于它在开发内核模块时的用法,并根据其定义,这个宏返回当前运行的用户空间进程的PID还是什么?
When a user-space process performs a system call, this macro points to the task_struct
associated with this process. 当用户空间进程执行系统调用时,此宏指向与此进程关联的
task_struct
。 It doesn't only contain the PID
of the process but a lot of other info. 它不仅包含过程的
PID
,还包含许多其他信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.