[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20060728224358.GA1824@DervishD>
Date: Sat, 29 Jul 2006 00:43:58 +0200
From: DervishD <lkml@...vishd.net>
To: Edgar Toernig <froese@....de>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [RFC] /dev/itimer
Hi Edgar :)
* Edgar Toernig <froese@....de> dixit:
> Everytime I have to write code to do something at regular
> intervals I face the problem that the time routines on Unix
> are pretty archaic. Only a single process wide timer which
> notifies via signals. The single timer asks for a dedicated
> roll-your-own timer infrastructur, usually implemented via
> a lot of gettimeofday calls and appropriate select timeouts.
I wrote a timer multiplexor library a time ago, but it had
problems due to signals (if a SIGALRM was lost, the entire timer
multiplexor stopped), wasn't very precise and although portable, it
depended entirely on reliable signals.
With your /dev/itimer, ALL problems are gone. It's a very good
idea, simple to use, very practical and almost language independent.
You're an effin genius ;)))
I hope this goes into the kernel, because I'm not sure how to do
this from userspace reliably. My timer multiplexor library was just a
queue of events, with a SIGALRM raised when the nearest event
expired. When the signal was raised, the expiration time for the next
event is computed and the next SIGALRM is programmed to that time.
There is some precission loss :(( and sometimes a SIGALRM was missed
and the entire multiplexor stopped. I didn't investigate the issue
because I wanted a better solution instead of trying to beat a dead
horse ;)) This looks like a better solution! At least, I don't know
about any other timer multiplexor (or multiple timers for an
applicatoin) library or code.
Thanks a lot!, and good luck getting this into the kernel. Any
chance of it being backported to 2.4.x?
Raúl Núñez de Arenas Coronado
--
Linux Registered User 88736 | http://www.dervishd.net
http://www.pleyades.net & http://www.gotesdelluna.net
It's my PC and I'll cry if I want to... RAmen!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists