[okl4-developer] rtc: using return value in device_interrupt to hide hw interrupts

Gabi Voiculescu boy3dfx2 at yahoo.com
Fri Nov 21 03:06:55 EST 2008


Hello.

My goal is to simulate a 64bit rtc timer instead of the hardware available 32bit one.

I just want to verify I understood correctly the interaction between vrtc server and a rtc driver in OKL4 2.1.

First, I want to be sure that the RTC timer counts time in seconds (not microseconds)!  

Second, I want to make sure I got the return values from device_interrupt_impl right to correctly hide HW interrupts from threads:


As I understand it, in vrtc_server.c, vrtc_async_handler(L4_Word_t notify) if device_interrupt returns with:
 non zero, alarm_callback() will notify whatever thread has set the alarm using L4_notify, zero, the thread that set the alarm won't be notified, in essence hiding the hardware interrupt from the thread that commanded the alarm.
So, to a thread that has set an alarm and now waits for it  to be set:
returning zero hides the hardware interrupt
returning non zero shows the hardware interrupt
The reason I ask is that in pxa250_rtc driver, the driver's device_interrupt_impl always returns 0, in essence hiding any hw alarms from other threads, which looks weird and might explain why I see alarm stuff being commented out in the iguana "driver_example".

Thank you,
Gabi Voiculescu





      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.okl4.org/pipermail/developer/attachments/20081120/ee48e692/attachment.htm 


More information about the Developer mailing list