blob: 4b18cd94d59d5060acfac02ad276101579ca481a [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
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 Lameter26946f42008-04-29 01:03:58 -070011#include <linux/kbuild.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070012#include <asm/io.h>
13
Linus Torvalds1da177e2005-04-16 15:20:36 -070014void 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));
22 DEFINE(TASK_UID, offsetof(struct task_struct, uid));
23 DEFINE(TASK_EUID, offsetof(struct task_struct, euid));
24 DEFINE(TASK_GID, offsetof(struct task_struct, gid));
25 DEFINE(TASK_EGID, offsetof(struct task_struct, egid));
26 DEFINE(TASK_REAL_PARENT, offsetof(struct task_struct, real_parent));
Eric W. Biederman9a5e7332006-02-01 03:06:12 -080027 DEFINE(TASK_GROUP_LEADER, offsetof(struct task_struct, group_leader));
Linus Torvalds1da177e2005-04-16 15:20:36 -070028 DEFINE(TASK_TGID, offsetof(struct task_struct, tgid));
29 BLANK();
30
31 DEFINE(SIZEOF_PT_REGS, sizeof(struct pt_regs));
32 DEFINE(PT_PTRACED, PT_PTRACED);
33 DEFINE(CLONE_VM, CLONE_VM);
34 DEFINE(CLONE_UNTRACED, CLONE_UNTRACED);
35 DEFINE(SIGCHLD, SIGCHLD);
36 BLANK();
37
38 DEFINE(HAE_CACHE, offsetof(struct alpha_machine_vector, hae_cache));
39 DEFINE(HAE_REG, offsetof(struct alpha_machine_vector, hae_register));
40}