内核中查看task_struct结构体教程
在linux下,路径:/usr/src/kernels/3.10.0-327.el7.x86_64(这个是自己kernels目录下的)/include/linux/sched.h
用管道命令查找:
[[email protected] linux]$ grep -n task_struct sched.h
结果显示出来很多,不好找
直接打开sched.h文件
[[email protected] linux]$ vim sched.h
打开后,会发现一堆的内容,不是很好找到,这时可以使用向下匹配