Questions about hrtimer interrupt handling

John Gamboa vaulttech at gmail.com
Thu Sep 27 11:40:57 EDT 2012


Hello...

I'm reading the code of the "hrtimer" [1] in order to use them in something
I've been programming lately. I read the tutorial in [2] and [3] about
them, but it seems that the code has changed a little since when it was
written. Thus, I have two questions:

1 - How can I know what CPU is handling a timer interruption (while inside
of the interruption function)? Is it possible to a timer be started by a
core and have its interruption handled by another core? (if the answer is
"no", then I could just make sure I know what is the core starting the
timer)

2 - In [2] it is said that there is a "void *data" pointer in the hrtimer
API. The code changed in newer kernel versions and I didn't find such a
pointer anymore. Supposing there is still such a pointer, what would be the
"equivalent" of the "void *data" pointer there? I mean: is there still a
way to pass some data to the hrtimer callback function? If the answer is
"yes", then how?


Thanks for your attention...

[1]
http://www.cs.fsu.edu/~baker/devices/lxr/http/source/linux/include/linux/hrtimer.h

http://www.cs.fsu.edu/~baker/devices/lxr/http/source/linux/kernel/hrtimer.c
[2] http://lwn.net/Articles/167897/
[3] http://www.ibm.com/developerworks/linux/library/l-timers-list/

-- 
John Gamboa
rabanetescebolas.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120927/c0bee412/attachment.html 


More information about the Kernelnewbies mailing list