This test can be use to verify that preemption withing the scheduler is
working as expected.  This code will work for RTL V2pre2 or RTAI 0.7.
Note that RTL/RTAI is detected by the presence of the file /usr/src/rtl/rtai
if your system is not set up this way, you will need to hardwire your
variant in the Makefile.

The test works by starting 2 RT tasks, the highest priority one with a 
5 millisecond period and a lower priority one with an 8 millisecond period.
Both tasks spin in a busy loop which is empirically calculated to take about 
2 milliseconds (it is factored by bogomips/cpu frequency to present the 
same load on all machines).  Each task writes to a fifo before the start of
its busy loop and after.  The user process preeempt gathers the data from
the fifo and prints the results to stdout, this data is piped to a perl 
program (peconv) that gathers 25 samples before printing the results in
an easily understood bit string.

To run this example type:

make
t, this data is piped to a perl 
program (peconv) that gathers 25 samples before printing the results in
an easily understood bit string.

To run this example type:

make
./run_test

You should see something like the following if the test passes:

[root@dell preempt]# ./run_test
/sbin/insmod preempt_rt clkspd=266
./preempt | ./peconv

Results, in millisecond intervals
0123456789012345678901234567890123456789012345678901234567890123456789
1100011000110001100011000110001100011000110001100011000110001100
00011000000011000001110000011000000001100001100000001100





