bug: kernel timer added twice
I tried to write a simple module where add_timer() was used to make the
kernel call my function after a time. The two simple source files are
listed (omit header file).
module.c as follows:
unsigned long timeout;
auto.c as follows:
void my_timeout(signed long timeout)
struct timer_list timer;
unsigned long expire;
expire = timeout +jiffies;
void *autoprint(unsigned long data)
printk(KERN_DEBUG "hello world\n");
It passed compilation, but failed in execution. After I inserted the module, it said, "bug: kernel timer added twice". However, I just use add_timer() ONCE, so I am very confused. Could anyone give me any suggestion? Thanks a lot!