How do I add a field to the struct task_struct in the sched.h file, the field consists of a linked list with a special non primitive node?
say i have this structure:
struct Node{
int counter;
char* buffer;
int sum;
}
and so on, and I want to add a list of such nodes? I don't want to re-implement the list with
struct Node{
int counter;
char* buffer;
int sum;
Node* next;
}
but I want to use struct list_head with the generic kernel list and not my implementation. But adding struct list_head to the task_struct just gives me another instance of task_struct while I want to add my special list with my specific fields.
In terms of C++, i want to add List to the struct_task so the file scehd.h will look something like
struct task_struct {
.
.
.
List<Node> myList;
.
.
}
How do i do that and how do I then how do initialize my node in the INIT_TASK macro?