[PATCH] POSIX timers for 2.4.1

From: Robert H. de Vries (rhdv@rhdv.cistron.nl)
Date: Sat Feb 03 2001 - 07:39:13 EST

Hi Linus,

Please accept this patch for inclusion. The impact on the kernel is
negligible and it makes the kernel a bit more POSIX feature complete. I
have received good feedback from people who have used the patch and I have
used it a lot myself without any problems.

This patch should not impact processes not using POSIX timers. The pointer
to the array of POSIX timers is left NULL. Nothing is done. When the first
timer is created and when a clone with the TIMER_CLONE flag is called, the
timer overhead is created.

As a reaction to the question if this should be in the kernel in the first
place: IMHO, there is no way to emulate these calls in user space by using
the setitimer() system call. For the following reasons:

a. setitimer() sends only SIGALRM, POSIX timers can send any signal.

b. setitimer() does not know about overruns, POSIX timers do.

c. setitimer() can be used only once in a given process, you can have
   up to 32 (configurable) POSIX timers at the same time in your process.

d. setitimer() cannot send extra information with its signal, POSIX timers
   can send a si_value when using RT signals.

There have been no changes to the code for almost half a year now. The code
has been shown to work on UP and SMP on x86 platforms. There is (untested)
support for most other platforms. This support is just the addition of the
system calls to the architecture dependent tables.

The patch is attached to this mail.
The change relative to the previous version (2.4.0) is only that the patch
now applies cleanly to 2.4.1.

Test code and some other patches can be found on:


Robert de Vries

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/

This archive was generated by hypermail 2b29 : Wed Feb 07 2001 - 21:00:17 EST