[lkml]   [1999]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Problems writting a CHAR Driver with interruptible_sleep (wait_ queu e)
From said:
> Seriously, you probably want to look at the PC speaker driver patch -
> this did some pretty hairy modifications to the timer interrupt stuff
> to have it use the RTC instead of the usual PC timer chip, I think.

> It seems to have disappeared from its previous home, but
> was last to be seen with it.

I didn't ever get round to making the timer use the RTC instead, although I
occasionally notice it somewhere down my TODO list.

What the PC speaker driver does at the moment is increase the irq0 timer rate
by <n> times, then call the old routine once in every <n> interrupts, after
doing the actual speaker stuff.

You can't use the RTC for the PC speaker, because it can't interrupt fast
enough. That's why we need to shift the system timer onto the RTC. said:
> Platforms. The TSC is an i386 thing, though other architectures
> often have similar features. Either way, it's only really useful for
> busy-waiting and accurate timing measurements anyway.

On platforms which support this kind of thing, #include <asm/timex.h> and use:
static inline cycles_t get_cycles (void);

On platforms which don't support it, this should always return zero.

---- ---- ----
David Woodhouse Office: (+44) 1223 810302
Project Leader, Process Information Systems Mobile: (+44) 976 658355
Axiom (Cambridge) Ltd., Swaffham Bulbeck, Cambridge, CB5 0NA, UK.
finger for PGP key.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:53    [W:0.020 / U:0.016 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site