File: check_asm.c

package info (click to toggle)
kernel-source-2.4.14 2.4.14-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 139,160 kB
  • ctags: 428,423
  • sloc: ansic: 2,435,554; asm: 141,119; makefile: 8,258; sh: 3,099; perl: 2,561; yacc: 1,177; cpp: 755; tcl: 577; lex: 352; awk: 251; lisp: 218; sed: 72
file content (32 lines) | stat: -rw-r--r-- 1,140 bytes parent folder | download | duplicates (18)
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
31
32
#include <linux/types.h>
#include <linux/stddef.h>
#include <linux/sched.h>
#include <asm/io.h>

int main()
{
	printf("#ifndef __ASM_OFFSETS_H__\n#define __ASM_OFFSETS_H__\n");

	printf("#define TASK_STATE %ld\n",
	       (long)offsetof(struct task_struct, state));
	printf("#define TASK_FLAGS %ld\n",
	       (long)offsetof(struct task_struct, flags));
	printf("#define TASK_SIGPENDING %ld\n",
	       (long)offsetof(struct task_struct, sigpending));
	printf("#define TASK_ADDR_LIMIT %ld\n",
	       (long)offsetof(struct task_struct, addr_limit));
	printf("#define TASK_EXEC_DOMAIN %ld\n",
	       (long)offsetof(struct task_struct, exec_domain));
	printf("#define TASK_NEED_RESCHED %ld\n",
	       (long)offsetof(struct task_struct, need_resched));
	printf("#define TASK_SIZE %ld\n", sizeof(struct task_struct));
	printf("#define STACK_SIZE %ld\n", sizeof(union task_union));

	printf("#define HAE_CACHE %ld\n",
	       (long)offsetof(struct alpha_machine_vector, hae_cache));
	printf("#define HAE_REG %ld\n",
	       (long)offsetof(struct alpha_machine_vector, hae_register));

	printf("#endif /* __ASM_OFFSETS_H__ */\n");
	return 0;
}