Thomas De Schampheleire wrote:
Hi,

I need some kernel code to be executed periodically and I am wondering what the best way would be to achieve this.
I can imagine the following possibilities:

- Have a thread run containing a while loop with a delay inside. This would have the disadvantage that the time between the thread's execution is run is not always fixed (it would depend on the load of the system, ...).

- Schedule a task to run at certain times. How do I achieve this? Which functions can I use from within the kernel to use the timer?

- Are there any other possibilities? Do they have certain advantages/disadvantages?


The taskq is what you're looking for. Check taskq(9F)
for more details, then src.opensolaris.org


James C. McPherson
--
Solaris kernel software engineer
Sun Microsystems
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to