#include "../README"

This example demonstrates the use of shared memory for commands from a
Linux process to an RT process, status from an RT process to a Linux
process, and error queueing from an RT process to a Linux process.

Shared memory must be set aside at boot time using LILO, for example,
by adding the line:

	append="mem=31m"

to a kernel entry in /etc/lilo.conf, and running /sbin/lilo. The "31m"
in this example sets base address to 31 MB, which on a 32 MB machine
would reserve 1 MB of shared memory. Note that you can only reserve
up to slightly less than 4 MB of memory.

The /dev/mem device must also be made read-write by all, or the Linux
process must be run as root or as setuid root. Changing the
permissions on /dev/mem to allow anyone to write is a security hole.

The RT process "rtmod.o" dereferences a pointer to shared memory
directly. The base address of the shared memory is declared in
common.h, as BASE_ADDRESS. This must be set to agree with the "mem="
argument to LILO, as described above. For a "mem=31m" line in
/etc/lilo.conf, the matching declaration would be

	#define BASE_ADDRESS (31 * 0x100000)

The Linux process gets a pointer to shared memory via mmap(), using
the same BASE_ADDRESS.

To run type `make; insmod rtmod.o; ./app', and type "help" to see how
to send a command, view status, and view the error log.
