gpt4 book ai didi

linux - 具体到linux 2.6.30.5中的task_struct

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:27:40 25 4
gpt4 key购买 nike

在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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com