On Thu, 14 Jul 2005, Russell King wrote: > > Umm. Except, according to your description of what it's supposed to > do, the above code can have an accumulating error. No. It can have a local drift, but the point is, the error never gets worse - it _stays_ local. There's no point in polling twice in immediate succession just because a sleep overslept. That's like a security guard testing each door twice for being locked, just because he overslept one round. Pointless. But what matters is that you don't let your local errors accumulate into the big picture. Now, if somebody wants to make nicer helper functions so that you can say timeout = ms_from_now(500); or something instead of saying "timeout = jiffies + HZ/2", then hey, go wild. At that point it's just syntactic sugar, and maybe it's worth it. Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: Gerd Knorr <kraxel@suse.de>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: Russell King <rmk+lkml@arm.linux.org.uk>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- References:
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: dean gaudet <dean-list-linux-kernel@arctic.org>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: Chris Wedgwood <cw@f00f.org>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: dean gaudet <dean-list-linux-kernel@arctic.org>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: Lee Revell <rlrevell@joe-job.com>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: Linus Torvalds <torvalds@osdl.org>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: Arjan van de Ven <arjan@infradead.org>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: Vojtech Pavlik <vojtech@suse.cz>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: Linus Torvalds <torvalds@osdl.org>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: Arjan van de Ven <arjan@infradead.org>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: Linus Torvalds <torvalds@osdl.org>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- From: Russell King <rmk+lkml@arm.linux.org.uk>
- Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- Prev by Date: Re: eepro100/e100 broken in 2.6.13-rc3
- Next by Date: Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- Previous by thread: Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- Next by thread: Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
- Index(es):
