How to Implement Periodic and Single Shot Timers in Linux?

In our program, we often need to do some tasks repeatedly with some time interval. We can think of a simple solution of having a loop with the actual task and a sleep()..  The sleep() function can wait for some time and then we can call a function to do the task. Problem here is … Continue reading “How to Implement Periodic and Single Shot Timers in Linux?”

How to Implement Periodic Timer in Linux Kernel

Linux Kernel already has a timer module that allows us to create timers which are not periodic by default. We can specify a callback function and a timeout value to the module. After expiry of the timeout value, the callback function will be called. Problem is the callback function will be called only once. Here we’ll … Continue reading “How to Implement Periodic Timer in Linux Kernel”

1
0
0
2
1
0