Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

adding a sleep / timer in a kernel module

I need to do task at regular intervals in a kernel module after the module has loaded. How do I achieve that. The examples on the web show a hello world in the init_module and exit_module. I have not seen any literature on how to code regularly occuring events inside a kernel module. Can someone please provide inputs? Thanks

like image 709
doon Avatar asked Jan 29 '26 00:01

doon


1 Answers

Have a look at this article for Linux: Kernel APIs, Part 3: Timers and lists in the 2.6 kernel

It has an example module that uses both the simple timer API, and highres timers.

like image 189
Mat Avatar answered Jan 31 '26 07:01

Mat