ADD_TIMER(9) Driver Basics ADD_TIMER(9)NAME
add_timer - start a timer
SYNOPSIS
void add_timer(struct timer_list * timer);
ARGUMENTS
timer
the timer to be added
DESCRIPTION
The kernel will do a ->function(->data) callback from the timer interrupt at the ->expires point in the future. The current time is
'jiffies'.
The timer's ->expires, ->function (and if the handler uses it, ->data) fields must be set prior calling this function.
Timers with an ->expires field in the past will be executed in the next timer tick.
COPYRIGHT Kernel Hackers Manual 2.6. July 2010 ADD_TIMER(9)
Check Out this Related Man Page
STRUCT HRTIMER(9) Driver Basics STRUCT HRTIMER(9)NAME
struct_hrtimer - the basic hrtimer structure
SYNOPSIS
struct hrtimer {
struct timerqueue_node node;
ktime_t _softexpires;
enum hrtimer_restart (* function) (struct hrtimer *);
struct hrtimer_clock_base * base;
unsigned long state;
#ifdef CONFIG_TIMER_STATS
int start_pid;
void * start_site;
char start_comm[16];
#endif
};
MEMBERS
node
timerqueue node, which also manages node.expires, the absolute expiry time in the hrtimers internal representation. The time is related
to the clock on which the timer is based. Is setup by adding slack to the _softexpires value. For non range timers identical to
_softexpires.
_softexpires
the absolute earliest expiry time of the hrtimer. The time which was given as expiry time when the timer was armed.
function
timer expiry callback function
base
pointer to the timer base (per cpu and per clock)
state
state information (See bit values above)
start_pid
timer statistics field to store the pid of the task which started the timer
start_site
timer statistics field to store the site where the timer was started
start_comm[16]
timer statistics field to store the name of the process which started the timer
DESCRIPTION
The hrtimer structure must be initialized by hrtimer_init
COPYRIGHT Kernel Hackers Manual 3.10 June 2014 STRUCT HRTIMER(9)
Hi ,
I am trying to learn timers in linux kernel. I am trying to write a program where I can configure a timer to tick in every 5 seconds and a function should thus exicute in every five seconds. I tried one program with the help of linux/timer.h headerfile but I couldnt get the... (4 Replies)
I'm a beginner to the Linux programming and trying my hands on some device driver examples while practising. The below code (a trimmed down version of tiny_tty.c from ldd3 book) loads perfectly using insmod and I'm able to see it in /proc/tty/drivers , /proc/modules and device nodes are getting... (1 Reply)
I have added a new experimental "Computer Science and Mathematics Trivia - True or False" section in the discussions, currently under the tags box.
In the future, I plan to
Expand this feature to add more trivia categories from math, science and technology.
Keep track of correct and... (20 Replies)