具体是linux 2.6.30.5中的task_struct

时间:2012-01-30 02:43:29

标签: linux linux-kernel

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

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

1 个答案:

答案 0 :(得分:2)

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