summaryrefslogtreecommitdiff
path: root/arch/um/util/mk_task_user.c
blob: 9db849f3f3ac3288d214c4678faa00bc501abe66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <stdio.h>

void print(char *name, char *type, int offset)
{
  printf("#define %s(task) *((%s *) &(((char *) (task))[%d]))\n", name, type,
	 offset);
}

void print_ptr(char *name, char *type, int offset)
{
  printf("#define %s(task) ((%s *) &(((char *) (task))[%d]))\n", name, type,
	 offset);
}

void print_head(void)
{
  printf("/*\n");
  printf(" * Generated by mk_task\n");
  printf(" */\n");
  printf("\n");
  printf("#ifndef __TASK_H\n");
  printf("#define __TASK_H\n");
  printf("\n");
}

void print_tail(void)
{
  printf("\n");
  printf("#endif\n");
}