For all versions of HRT

For 2005-4-20

Change libposixtime to match the standard for clock_nanosleep (which for
reasons unknow wants to return the errno rather than -1 on errors).
This caused changes in the test code and the clock_nanosleep man page.

We have also added a couple of tests from the big conformance test
suite.

For 2004-9-4

Changes to the make file to use the compiler to decide if we are doing
x86 (for which we do a shared as well as an archive lib).  Other changes
as noted in the README.

For 2004-4-20

We have added a couple of test programs to the test directory.  The most
useful is the nanosleep_jitter test.  If you run this with 10 50 it will
do 10 loop of 1000 sleeps of 50 micro seconds (second parameter).  It
keeps track of the min and max time for each sleep in the 1000 and
reports that at the end.  If you find that the max is much longer than
the min, it usually means that your sub-jiffie interrupt clock is not in
sync with the jiffie clock.  This causes timers that should expire soon
after the jiffie interrupt to be hidden by the jiffie interrupt.  For
example, if, on arrival at the run_timer list code the time is already
x.5 jiffies any timer that was to pop at x.05 is way late.  This happens
when the sub-jiffie clock is not clocking a jiffie at the same time as
the jiffie clock, thus the need for sync code.

The make file for the library now makes both shared and archive
libraries provided that the kernel was built for an x86 system.  If it
is not an x86, only the archive library is built as we don't have all
the bits to build shared for other archs.

Along with this we now require that this stuff be able to find the
kernel at "../../..", that is it must be in the kernel tree.  You can
change this by changing the library path to match what ever you need.
See the lib make file.

We have added Randy Dunlap's timerstress program in the tests package.

For version 2.4.18-3.0

This version is the first to have the clock_nanosleep absolute feature
which POSIX says, if the clock is set under the sleep, it will still
expire when it should (unless that time is now past, in which case it
should expire immediately).

We now have a clock_nanosleep test with help from Robert Love and
George.  It actually verifies the above feature as well as that signals
that don't get delivered to the user do not cause clock_nanosleep to
stop, while those that do, do.  We tested using SIGSTOP and SIGCONT.

It turns out that, if we are not doing high res (either because it is
turned off or because there are no high res timers expiring) that the
PIT (which is to give us periodic interrupts) drifts with respect to the
clock, be it TSC or ACPI pm timer.  This causes the jiffie interrupts to
drift around causing varying and significant latency in the delivery
of low res timers.  We now have code to detect this drift and "touch"
the PIT as needed to get it to give us interrupts much closer to when we
want them.  I suppose we could use this as an indication that we have
not done as good a job of calibrating the TSC as we would like.  But
even the ACPI drifts and it should be on the same "rock".

The man pages have been updated to (hopefully) get the arguments right.

A bug was found and fixed in the test to see if a timer was referenced
to CLOCK_MONOTONIC.  It caused nasty errors when converting such timers
to the system base.

After spending a LOT of time getting clock_nanosleep and its test to
work, I decided to error out requests for times beyond what can be fit
in the (size of long) jiffie.  In the past these were just set to the
max value.  This just caused such obvious errors to look like normal
timers, not fun to debug.

AND, least I forget, we have moved to a shared system call stub library.
This should allow you to not reload your using code, even if the system
call numbers change.  It did take a few more files (purloined from
glibc) to do it, however.

The library make file will also figure out if the itimer struct is needed
in posix_lib.h and do the right thing.

For version 2.4.18-1.0

Made the sub_expire member of the timer_list structure unconditional.
This should allow modules compiled against high res on or off to play
regardless of how the kernel is compiled.

Also moved jiffies out of the #define name space.  It is now defined by
the linker and is only in the extern name space.  You are free to use it
as a dummy variable, local variable or member of a struct or union.

For version 2.4.17-3.0

Found a fixed a major bug that lost (or delayed) timers for a LONG time.
All timers, not just POSIX timers.

Also removed changes to limits.h and changed config.in to default to
3000 timers and to use the TSC clock.  Also disabled some debug code
that was getting turned on if CONFIG_KGDB was defined.

For version 2.4.17-2.2

Fixed the set up of the arch_to_latch conversion constant so we actually
do get sub jiffies interrupts, thanks to Jim Houston for spotting this
one.

Put normalize code in the clock_gettime() call so we no longer return
un-normalized time (i.e. nanoseconds > 1 sec.).

Changed the run_timer_list code to get the latest version of "NOW" just
prior to the scan.

Changed schedule_next_interrupt() to accept a flag indicating how to
return if the requested time has already elapsed (it was indicating
"time elapsed" and not scheduling an interrupt which does not work well
if we REALLY need the interrupt).

For version 2.4.17-2.1

Since 2.4.17-3.1 (the last to go to sourceforge)

Fixed compile problems with high-res-timers turned off (who would do
such a thing?)

Changed all the ex_ math code to sc_ (it is scaled math after all).

Added man pages

Changed to no longer try to measure the minimun interval we can
support.  It is now fixed at 500 micro seconds.  Looking for a new way
to do this.  The old one ran into NMI issues on SMP machines.

Fixed config.in "] problem (must be " ]).

Picked up several more name space collisions on jiffies.

Added the rest of the system call links for all archs, save, I think sh.

Fixed a bug where a call to clock_gettime messed up gettimeofday.

Simplified the lib stuff and moved the whole thing into the kernel tree.
It no longer depends on links in /usr/include.

I am sure I am forgetting something, but sigh, lets ship this thing.

