Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Generate definitions needed by assembly language modules. |
| 3 | * This code generates raw asm output which is post-processed to extract |
| 4 | * and format the required data. |
| 5 | */ |
| 6 | |
| 7 | #include <linux/types.h> |
| 8 | #include <linux/stddef.h> |
| 9 | #include <linux/sched.h> |
| 10 | #include <linux/ptrace.h> |
Christoph Lameter | 26946f4 | 2008-04-29 01:03:58 -0700 | [diff] [blame] | 11 | #include <linux/kbuild.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | #include <asm/io.h> |
| 13 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | void foo(void) |
| 15 | { |
| 16 | DEFINE(TI_TASK, offsetof(struct thread_info, task)); |
| 17 | DEFINE(TI_FLAGS, offsetof(struct thread_info, flags)); |
| 18 | DEFINE(TI_CPU, offsetof(struct thread_info, cpu)); |
| 19 | BLANK(); |
| 20 | |
| 21 | DEFINE(TASK_BLOCKED, offsetof(struct task_struct, blocked)); |
David Howells | b6dff3e | 2008-11-14 10:39:16 +1100 | [diff] [blame] | 22 | DEFINE(TASK_CRED, offsetof(struct task_struct, cred)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 23 | DEFINE(TASK_REAL_PARENT, offsetof(struct task_struct, real_parent)); |
Eric W. Biederman | 9a5e733 | 2006-02-01 03:06:12 -0800 | [diff] [blame] | 24 | DEFINE(TASK_GROUP_LEADER, offsetof(struct task_struct, group_leader)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | DEFINE(TASK_TGID, offsetof(struct task_struct, tgid)); |
| 26 | BLANK(); |
| 27 | |
David Howells | b6dff3e | 2008-11-14 10:39:16 +1100 | [diff] [blame] | 28 | DEFINE(CRED_UID, offsetof(struct cred, uid)); |
| 29 | DEFINE(CRED_EUID, offsetof(struct cred, euid)); |
| 30 | DEFINE(CRED_GID, offsetof(struct cred, gid)); |
| 31 | DEFINE(CRED_EGID, offsetof(struct cred, egid)); |
| 32 | BLANK(); |
| 33 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 34 | DEFINE(SIZEOF_PT_REGS, sizeof(struct pt_regs)); |
| 35 | DEFINE(PT_PTRACED, PT_PTRACED); |
| 36 | DEFINE(CLONE_VM, CLONE_VM); |
| 37 | DEFINE(CLONE_UNTRACED, CLONE_UNTRACED); |
| 38 | DEFINE(SIGCHLD, SIGCHLD); |
| 39 | BLANK(); |
| 40 | |
| 41 | DEFINE(HAE_CACHE, offsetof(struct alpha_machine_vector, hae_cache)); |
| 42 | DEFINE(HAE_REG, offsetof(struct alpha_machine_vector, hae_register)); |
| 43 | } |