The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/i386/linux/linux_genassym.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* $FreeBSD: src/sys/i386/linux/linux_genassym.c,v 1.2.4.2 1999/09/05 08:14:13 peter Exp $ */
    2 #include <stdio.h>
    3 #include <sys/param.h>
    4 #include <sys/buf.h>
    5 #include <sys/proc.h>
    6 #include <i386/linux/linux.h>
    7 
    8 #define offsetof(type, member)  ((size_t)(&((type *)0)->member))
    9 #define OS(s, m)                ((u_int)offsetof(struct s, m))
   10 
   11 int     main __P((void));
   12 
   13 int
   14 main()
   15 {
   16 #if     0
   17         struct linux_sigframe *linux_sigf = (struct linux_sigframe *)0;
   18         struct linux_sigcontext *linux_sc = (struct linux_sigcontext *)0;
   19 
   20         printf("#define\tLINUX_SIGF_HANDLER %d\n", &linux_sigf->sf_handler);
   21         printf("#define\tLINUX_SIGF_SC %d\n", &linux_sigf->sf_sc);
   22         printf("#define\tLINUX_SC_FS %d\n", &linux_sc->sc_fs);
   23         printf("#define\tLINUX_SC_GS %d\n", &linux_sc->sc_gs);
   24         printf("#define\tLINUX_SC_EFLAGS %d\n", &linux_sc->sc_eflags);
   25 #else
   26         printf("#define\tLINUX_SIGF_HANDLER %u\n",
   27                 OS(linux_sigframe, sf_handler));
   28         printf("#define\tLINUX_SIGF_SC %u\n", OS(linux_sigframe, sf_sc));
   29         printf("#define\tLINUX_SC_FS %u\n", OS(linux_sigcontext, sc_fs));
   30         printf("#define\tLINUX_SC_GS %u\n", OS(linux_sigcontext, sc_gs));
   31         printf("#define\tLINUX_SC_EFLAGS %u\n",
   32                 OS(linux_sigcontext, sc_eflags));
   33 #endif
   34         return (0);
   35 }

Cache object: fa2e1bf1fd399032c817264908cf8712


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.