patch-2.1.121 linux/arch/alpha/kernel/check_asm.c

Next file: linux/arch/alpha/kernel/core_apecs.c
Previous file: linux/arch/alpha/kernel/bios32.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.120/linux/arch/alpha/kernel/check_asm.c linux/arch/alpha/kernel/check_asm.c
@@ -0,0 +1,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;
+}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov