[LWN Logo]

Date:	Tue, 18 Apr 2000 20:45:48 +0200 (CEST)
From:	Robert de Vries <rhdv@rhdv.cistron.nl>
To:	Linus Torvalds <torvalds@transmeta.com>,
Subject: [PATCH] POSIX timers for linux 2.3.99-pre5

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
   upto 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.


Any comments?

Test code and some other patches can be found on:
http://www.rhdv.cistron.nl/posix.html

        Robert


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