linux - 具体到linux 2.6.30.5中的task_struct

标签 linux linux-kernel

在2.6.15版本,我知道我可以重写文件(include/linux/sched.h)中的task_struct,比如:

struct task_struct {  
    unsigned did_exec:1;  
    pid_t pid;  
    pid_t tgid;  
    ...
    char hide;
}  

但不幸的是,当我来到 2.6.30.5 版本时,我查看了同一个文件,我只发现了 task_struct 的声明,例如:

struct task_struct;

我不知道我应该引用哪个文件,以明确我自己的 task_struct?

有人可以帮助我吗?thx

最佳答案

struct task_struct 仍在 sched.h 中定义,您只需要继续阅读文件即可。

关于linux - 具体到linux 2.6.30.5中的task_struct,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9058777/

相关文章:

python - "scripting"vim 使用更细粒度的 python

linux - shell 脚本中的函数未正确执行

linux - kmalloc 中 GFP_USER 标志的用途是什么?

linux-kernel - 中断标志IRQF_TRIGGER_NONE有什么用?

linux - __va() 和 phys_to_virt() 有什么区别?

linux - cpu hotplug - 在 linux 中是否有禁用 cpu 的系统调用?

c++ - 无法抑制 valgrind 中的错误

c - 重定向到 execlp()

linux - 从Linux导入oracle转储文件到远程服务器

tcp - 在更高流量的 ubuntu 12 nginx 服务器上忽略 SYN 数据包