Re: [osol-code] high resolution timer

2009-03-10 Thread Paul Durrant
Mladen Nikitovic wrote: For very short waits i could use busy-wait, but for longer waits I would like to have something that is non-blocking. OK. Depending on where you do your busy-wait, of course, it may be pre-emptable and so not blocking to the CPU. I agree that long waits may as well yi

Re: [osol-code] high resolution timer

2009-03-09 Thread Mladen Nikitovic
I'm writing a kernel module. -- This message posted from opensolaris.org ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Re: [osol-code] high resolution timer

2009-03-09 Thread Mladen Nikitovic
For very short waits i could use busy-wait, but for longer waits I would like to have something that is non-blocking. Regards, Mladen -- This message posted from opensolaris.org ___ opensolaris-code mailing list opensolaris-code@opensolaris.org http:/

Re: [osol-code] high resolution timer

2009-03-09 Thread Paul Durrant
Mladen Nikitovic wrote: 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. Actually, re-reading this I'm a little confused... are you running in kernel or

Re: [osol-code] high resolution timer

2009-03-09 Thread Paul Durrant
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-

[osol-code] high resolution timer

2009-03-09 Thread Mladen Nikitovic
Hi, 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. Then I discovered that there are cyclics that can be created using