[okl4-developer] vtimer source file?

Nelson Tam nelson at ok-labs.com
Fri Feb 15 11:56:07 EST 2008


Hi Ryan,

On 15/02/2008, at 11:44 AM, Ryan Heffernan wrote:

> All I really need to do with the timer is do a 25 ms non-busy wait,  
> and
> it appears that the virtual timer interface doesn't supply a function
> for this (like timer_wait() in libs/timer/timer.c). I was wondering if
> you would know of a way of doing this?


You should use virtual_timer_request().  The driver example app should  
help
here.  Note the use of the MILLISECS() macro.

This will set up a periodic, non-busy wait of 25 ms.  The calling  
thread will
receive an async ipc when the timeout is reached.

The periodic timeout can be removed using virtual_timer_cancel().
--
(nt)

Nelson Tam
nelson at ok-labs.com






More information about the Developer mailing list