Directories: oskit/unix
Target: liboskit_unix.a
	unix_support_pthreads.o unix_support.o
Documentation: unix-support.tex
Original Code Source: Flux Research Group, University of Utah
	sys/linux directory is partial Linux code (???)
	sys/freebsd directory is partial FreeBSD code (???)
Description:

This directory contains files providing the necessary support to debug
and run certain OS Kit components in user-mode on unix.  In
particular, you can run the networking stack on a separate interface,
and run file system code on a regular Unix file.  Timers are also
supported.  (The liboskit_unix_sys.a library is taken care of by the
stuff in the sys subdirectory.)

By default, programs are compiled and linked against the oskit
headers, and linked against the oskit C library (rather than the
system headers in /usr/include and system libraries in /usr/lib).
This allows more complete oskit kernels to be run in user mode.  This
requires an additional library that contains the syscall stubs,
renamed to avoid name collision.

Support is provided for Linux with glibc and ELF, along with FreeBSD
2.x a.out and 3.x a.out or ELF.  A number of example programs that use
this code can be built in the examples/unix directory.  Support is
controlled by the UNIX_HOST makefile variable.

XXX Difference from sys/ subdir

---

To run on Linux it's recommended that you use a 2.2.x kernel.  The
2.0.x kernels don't support sigaltstack or the SO_SNDLOWAT,
SO_RECVLOWAT, SO_SNDTIMEO or SO_RCVTIMEO socket options which are
needed for general oskit support.  If you do run on a 2.0.x kernel,
make sure you disable the STACKGUARD code in the pthreads library
p(currently the only thing that uses sigaltstack) and make sure that
your oskit program can tolerate those socket options being undefined.

All Linux systems are limited by the fact that all of the above socket
options are read-only.  This may be a problem since the oskit supports
setting these options on sockets.  None of the example programs, at
least, rely on this behavior.

Re debugging, you may see errors like
	Cannot insert breakpoint 0:
	Error accessing memory address 0xe: Invalid argument.
when single stepping in code after an itimer has been setup.  (Note
that 0xe == 14 == SIGALRM, on FreeBSD at least.)  To work around this
you can set a breakpoint before the itimers are setup which does
"handle SIGALRM pass" and then set one after the itimer stuff which
does "handle SIGALRM ignore".  (I.e., set the breakpoint and then use
the gdb "commands" command.)
