Re: del_timer()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



aksingh@hss.hns.com wrote:



HI,


 Can I call a del_timer() on a timer that is not currently running ? Is
this an error, i believe if del_timer returns 1 that means the timer was
running, if it returns zero, it wasnt running , right ?

thanks
Amit

A timer is automatically deleted when it ends up or if you call del_timer. You should use del_timer_sync to avoid race conditions (in the case that the timer ends up when the function del_timer is executed).
And if the base timer is not set, then del_timer returns 0 and the timer isn't deleted and otherwise it effectively delete the timer.



-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux