看板 DFBSD_kernel 關於我們 聯絡資訊
: Thanks for the long answer. But I don't get where hz comes from. It's :obviously not timer <not 0> then. (And 18.2 Hz might be a bit slow.) : : So is the "hz tick" just another event that timer 0 checks (and sets up :an interval) for then? Right. The 'hz' tick is just a periodic SYSTIMER in DFly, whereas in FreeBSD the 'hz' tick is the primary timer 0 timebase interrupt. : (And is then timer <not 0> used to calculate how many cycles there are to :go until the next tick? (Since timer 0 is "unsuitable for keeping track :of ''real'' time") ) Right. The timer <not 0> is used to calculate the elapsed time in microsecond granularity. It does not need to generate an interrupt or anything, it just needs to be consistent. In fact, the TSC or APIC ltimer or other hardware timers could be used for this purpose (though each has its quirks, which is why I'd really like to use one of the 8254 timers). The real time clock (rtc) chip does not have enough resolution to use for this purpose. : This stuff is interesting, had to think for a bit too. Thanks again. : :Magnus -Matt Matthew Dillon <dillon@backplane.com>