Skip to contentSkip to conversation

example of kernel thread

DISCUSSION Ottavio Campana 2 participants 2 messages Feb 10, 2006

lore
Share & tools
lore
#0 lore raw

I'm writing a little driver and I need to run a thread to poll data.

I've googled a bit to find an example, but I only found this
http://www.scs.ch/~frey/linux/kernelthreads.html
but it is for 2.4, while I need it for 2.6

Do you know any example and/or tutorial for kernel threads?

Thank you.

PS: can you please CC me because I didn't subscribe the list?

Signature · 1 line
Non c'è più forza nella normalità, c'è solo monotonia.
#1 lore raw
Quoted 8 lines · Ottavio Campana

I'm writing a little driver and I need to run a thread to poll data.

I've googled a bit to find an example, but I only found this
http://www.scs.ch/~frey/linux/kernelthreads.html
but it is for 2.4, while I need it for 2.6

Do you know any example and/or tutorial for kernel threads?

You can get help from include/linux/kthread.h (its well commented) and can also take a look at drivers/md/md.c (the md_thread function and hows kernel_thread is used) !

--
Fawad Lateef