check_asm.c
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:1k
- #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 %ldn",
- (long)offsetof(struct task_struct, state));
- printf("#define TASK_FLAGS %ldn",
- (long)offsetof(struct task_struct, flags));
- printf("#define TASK_SIGPENDING %ldn",
- (long)offsetof(struct task_struct, sigpending));
- printf("#define TASK_ADDR_LIMIT %ldn",
- (long)offsetof(struct task_struct, addr_limit));
- printf("#define TASK_EXEC_DOMAIN %ldn",
- (long)offsetof(struct task_struct, exec_domain));
- printf("#define TASK_NEED_RESCHED %ldn",
- (long)offsetof(struct task_struct, need_resched));
- printf("#define TASK_SIZE %ldn", sizeof(struct task_struct));
- printf("#define STACK_SIZE %ldn", sizeof(union task_union));
- printf("#define HAE_CACHE %ldn",
- (long)offsetof(struct alpha_machine_vector, hae_cache));
- printf("#define HAE_REG %ldn",
- (long)offsetof(struct alpha_machine_vector, hae_register));
- printf("#endif /* __ASM_OFFSETS_H__ */n");
- return 0;
- }