summaryrefslogtreecommitdiffstats
path: root/arch/um/sys-i386/util/mk_thread.c
blob: 7470d0dda67ec98d6a347fdab2f09101988de6cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <stdio.h>
#include <kernel-offsets.h>

int main(int argc, char **argv)
{
  printf("/*\n");
  printf(" * Generated by mk_thread\n");
  printf(" */\n");
  printf("\n");
  printf("#ifndef __UM_THREAD_H\n");
  printf("#define __UM_THREAD_H\n");
  printf("\n");
  printf("#define TASK_DEBUGREGS(task) ((unsigned long *) "
	 "&(((char *) (task))[%d]))\n", TASK_DEBUGREGS);
#ifdef TASK_EXTERN_PID
  printf("#define TASK_EXTERN_PID(task) *((int *) &(((char *) (task))[%d]))\n",
	 TASK_EXTERN_PID);
#endif
  printf("\n");
  printf("#endif\n");
  return(0);
}
OpenPOWER on IntegriCloud