On Mon, 30 Oct 2000, Wang Haiguang wrote:
>
> Waht is the meaning of following code in vs:
>
> #define TVN_BITS 6
> #define TVR_BITS 8
>
TVN stands for Timer Vector Number, and TVR stands for Timer Vector
Root. The slower timer code is mostly taken from linux/kernel/timer.c.
Look at the linux/kernel/timer.c, you can see timer handling is just
like a clock. For example, timers can be set from 1 seconds to 12 hours,
so those timers can be hooked at second wheel, minute wheel and hour
wheel. When second hand moves forward one second, timers which second
wheel points to are expired. When second hand turns a round, then minute
handle move forward, and timers which minute hand point to are cascaded
to second wheel. So does hour hand.
Hope that this example can help you understand timer handling.
Wensong
> Thanks
>
>
>
>
>
|