리눅스에 moudle을 추가하고 싶습니다. 이 내 코드 내 일부입니다왜이 오류 'init_task'가 선언되지 않았습니까 (이 함수에서 처음 사용합니까?)?
1 #include<linux/module.h>
2 #include<linux/kernel.h>
3 #include<linux/init.h>
4 #include<linux/sched.h>
5 #include<linux/list.h>
6
7 MODULE_LICENSE("GPL");
8
9 static int sched_fun_init(void)
10 {
11 struct task_struct *p,*ts = &init_task;
12 struct list_head *pos;
는하지만이 얻을 :이 선언되지 않은 때문에
error: ‘init_task’ undeclared (first use in this function)
struct task_struct *p,*ts = &init_task;