Implementation

After having introduced all required data structures and components, let's fill in the last missing pieces by discussing the mechanisms of how high-resolution timers are expired and their callback function run.

Recall that parts of the high-resolution timer framework are also compiled into the kernel even if explicit support for them is disabled. Expiring high-resolution timers is in this case driven by a clock with low-resolution. This avoids code duplication because users of high-resolution timers need not supply an extra version of their timing-related code for systems that do not have high-resolution capabilities. The high-resolution framework is employed as usual, but operates with only low resolution.

Even if high-resolution support is compiled into the kernel, only low resolution will be available at boot time, so the situation is identical to the one described above. Therefore, we need to take two possibilities into account for how high-resolution timers are run: based on a proper clock with high-resolution capabilities, and based on a low-resolution clock.

Continue reading here: High Resolution Timers in High Resolution Mode

Was this article helpful?

0 0