2 #include <kernel-offsets.h>
4 void print_ptr(char *name
, char *type
, int offset
)
6 printf("#define %s(task) ((%s *) &(((char *) (task))[%d]))\n", name
, type
,
10 void print(char *name
, char *type
, int offset
)
12 printf("#define %s(task) *((%s *) &(((char *) (task))[%d]))\n", name
, type
,
16 int main(int argc
, char **argv
)
19 printf(" * Generated by mk_task\n");
22 printf("#ifndef __TASK_H\n");
23 printf("#define __TASK_H\n");
25 print_ptr("TASK_REGS", "union uml_pt_regs", TASK_REGS
);
26 print("TASK_PID", "int", TASK_PID
);