File: check_asm.c

package info (click to toggle)
kernel-image-2.4.17-hppa 32.4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 156,356 kB
  • ctags: 442,585
  • sloc: ansic: 2,542,442; asm: 144,771; makefile: 8,468; sh: 3,097; perl: 2,578; yacc: 1,177; 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;
}