mk_thread.c 559 B

12345678910111213141516171819202122
  1. #include <stdio.h>
  2. #include <kernel-offsets.h>
  3. int main(int argc, char **argv)
  4. {
  5. printf("/*\n");
  6. printf(" * Generated by mk_thread\n");
  7. printf(" */\n");
  8. printf("\n");
  9. printf("#ifndef __UM_THREAD_H\n");
  10. printf("#define __UM_THREAD_H\n");
  11. printf("\n");
  12. printf("#define TASK_DEBUGREGS(task) ((unsigned long *) "
  13. "&(((char *) (task))[%d]))\n", TASK_DEBUGREGS);
  14. #ifdef TASK_EXTERN_PID
  15. printf("#define TASK_EXTERN_PID(task) *((int *) &(((char *) (task))[%d]))\n",
  16. TASK_EXTERN_PID);
  17. #endif
  18. printf("\n");
  19. printf("#endif\n");
  20. return(0);
  21. }