home *** CD-ROM | disk | FTP | other *** search
- #include <linux/sched.h>
- #include <linux/bootinfo.h>
-
- #define offsetof(type, member) ((size_t)(&((type *)0)->member))
-
- void printf (const char *fmt, ...);
-
- int main(void)
- {
- printf ("LTS_STATE = %d\n", offsetof (struct task_struct, state));
- printf ("LTS_COUNTER = %d\n", offsetof (struct task_struct, counter));
- printf ("LTS_PRIORITY = %d\n", offsetof (struct task_struct, priority));
- printf ("LTS_SIGNAL = %d\n", offsetof (struct task_struct, signal));
- printf ("LTS_BLOCKED = %d\n", offsetof (struct task_struct, blocked));
- printf ("LTS_FLAGS = %d\n", offsetof (struct task_struct, flags));
- printf ("LTS_ERRNO = %d\n", offsetof (struct task_struct, errno));
- printf ("LTS_KSTACK = %d\n", offsetof (struct task_struct, kernel_stack_page));
- printf ("LTS_TSS = %d\n", offsetof (struct task_struct, tss));
-
- printf ("LTSS_REGS = %d\n", offsetof (struct m68k_struct, regs));
- printf ("LTSS_SR = %d\n", offsetof (struct m68k_struct, sr));
- printf ("LTSS_FS = %d\n", offsetof (struct m68k_struct, fs));
- printf ("LTSS_CRP = %d\n", offsetof (struct m68k_struct, crp));
- printf ("LTSS_FPREGS = %d\n", offsetof (struct m68k_struct, fpregs));
- printf ("LTSS_FPCNTL = %d\n", offsetof (struct m68k_struct, fpcntl));
- printf ("LTSS_FPSTATE = %d\n", offsetof (struct m68k_struct, fpstate));
-
- printf ("LKSTART_ADDR = %d\n", KSTART_ADDR);
- printf ("LFLUSH_I_AND_D = %d\n", FLUSH_I_AND_D);
- printf ("LPAGE_PRESENT = %d\n", PAGE_PRESENT);
- printf ("LPAGE_CACHE040 = %d\n", PAGE_CACHE040);
- printf ("LPAGE_SIZE = %ld\n", PAGE_SIZE);
-
- /* boot_info structure field offsets */
- printf ("LBI_MACH = %d\n",
- offsetof (struct bootinfo, machtype));
- printf ("LBI_CPU = %d\n",
- offsetof (struct bootinfo, cputype));
- printf ("LBI_AMIGA_ECLK = %d\n",
- offsetof (struct bootinfo, bi_amiga.eclock));
-
- printf ("LMACH_AMIGA = %d\n",MACH_AMIGA);
-
- return 0;
- }
-