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 yield the CPU though. I'd suggest using drv_usecwait() for anything up to the millisecond level and then perhaps cv_timedwait() (or if you don't care about using published interfaces, you could use realtime_timout() directly).

  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