Linux-2.6.12-rc2
[linux-2.6/next.git] / arch / um / sys-i386 / util / mk_thread_user.c
blob2620cd6aa1f139bc2c1a2de6f7b0cf7ce2a02097
1 #include <stdio.h>
3 void print_head(void)
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");
14 void print_constant_ptr(char *name, int value)
16 printf("#define %s(task) ((unsigned long *) "
17 "&(((char *) (task))[%d]))\n", name, value);
20 void print_constant(char *name, char *type, int value)
22 printf("#define %s(task) *((%s *) &(((char *) (task))[%d]))\n", name, type,
23 value);
26 void print_tail(void)
28 printf("\n");
29 printf("#endif\n");