freebsd-dev/sys/i386/linux/linux_genassym.c
Luoqi Chen 5206bca10a Enable vmspace sharing on SMP. Major changes are,
- %fs register is added to trapframe and saved/restored upon kernel entry/exit.
- Per-cpu pages are no longer mapped at the same virtual address.
- Each cpu now has a separate gdt selector table. A new segment selector
  is added to point to per-cpu pages, per-cpu global variables are now
  accessed through this new selector (%fs). The selectors in gdt table are
  rearranged for cache line optimization.
- fask_vfork is now on as default for both UP and SMP.
- Some aio code cleanup.

Reviewed by:	Alan Cox	<alc@cs.rice.edu>
		John Dyson	<dyson@iquest.net>
		Julian Elischer	<julian@whistel.com>
		Bruce Evans	<bde@zeta.org.au>
		David Greenman	<dg@root.com>
1999-04-28 01:04:33 +00:00

25 lines
618 B
C

/* $Id: linux_genassym.c,v 1.8 1998/07/29 15:50:41 bde Exp $ */
#include <sys/param.h>
#include <i386/linux/linux.h>
#define offsetof(type, member) ((size_t)(&((type *)0)->member))
#define OS(s, m) ((u_int)offsetof(struct s, m))
int main __P((void));
int printf __P((const char *, ...));
int
main()
{
printf("#define\tLINUX_SIGF_HANDLER %u\n",
OS(linux_sigframe, sf_handler));
printf("#define\tLINUX_SIGF_SC %u\n", OS(linux_sigframe, sf_sc));
printf("#define\tLINUX_SC_GS %u\n", OS(linux_sigcontext, sc_gs));
printf("#define\tLINUX_SC_EFLAGS %u\n",
OS(linux_sigcontext, sc_eflags));
return (0);
}