mp26 at os.inf.tu-dresden.de
Sat Jun 7 20:00:34 CEST 2008
eric johnson wrote:
> i need to write a user land program which would measure the times in
> milliseconds .
> how do i do this ? i wouldnt want to make a system call.
If you seriously want to prevent system calls you have three options:
- Use the time stamp counter of your machine (if it has one, you didn't
specify your hardware). Usual problems are, frequency stability of
you do dynamic frequency scaling and synchronicity on MP. TSC has a
very low overhead.
- Your program could be allowed hardware access to a timer device, such
as the HPET and drive it.
- You have an external clock server which provides the current time in
a shared memory page. This could be a userland program or the
kernel. In both cases, the timer interrupt would have to be at least
1kHz for you required resolution.
More information about the l4-hackers