Mladen Nikitovic wrote:

I want to introduce a delay in my code. The delay can be in
nanoseconds up to milliseconds. My current apporach using _timeout_
function with a callback has a lowest resolution of 10ms, which is
too coarse for my purpose.


For very short waits then you may want to busy-wait; look at drv_usecwait().

Then I discovered that there are cyclics that can be created using
timer_create function. According to the online manual, using argument
CLOCK_HIGHRES should give me the desired resolution. If this is true
then I only have one more problem: I would really like to connect a
callback function/routine (in C) to this timer in the same way I used
the timeout. Reading the manual pages didn't give me any answers or
examples regarding how to do this, so I hope someone here can help
me.


I didn't think cyclics were 'officially' documented yet. If you want to attach a callback to be kicked off by a cyclic then I guess you'll need to come up with your own mechanism.

  Paul

--
===================================
Paul Durrant
http://www.linkedin.com/in/pdurrant
===================================
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to