Re: timer interrupt

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

 



On Sat, Jan 3, 2009 at 6:20 PM, Microbit_Ubuntu
<microbit@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> Hello all,
>
> I've just joined up with this list, so this is mainly an initial "ping"
> to see if I can post.
> I'm a newbie studying embedded linux on an Olimex SAM9-L9260 target,
> cross compiling on Ubuntu 8.10.
>
> Eventually I'd like to ask a couple of questions. On the subject of
> timer INTs, I actually just got timer callbacks going in this sort of
> newbie handler approach :
>
> static void timer_fire(unsigned long data)
> {
>  mod_timer(&timer_ticktock, jiffies + (timer_tick*HZ));
>  printk ("Timer fired at %lu jiffies\n",jiffies);
> }
>

since u used mod_timer(), did u also use del_timer() to delete the
timer in your exit module code?

(check for example, drivers/char/synclinkmp.c:shutdown() routine).

but from kernel/timer.c these are the API for xxx_timer():

EXPORT_SYMBOL(init_timer);
EXPORT_SYMBOL(init_timer_deferrable);
EXPORT_SYMBOL(__mod_timer);
EXPORT_SYMBOL(mod_timer);
EXPORT_SYMBOL(del_timer);
EXPORT_SYMBOL(try_to_del_timer_sync);
EXPORT_SYMBOL(del_timer_sync);

so it seemed there is another del_timer_sync(), or
try_to_del_timer_sync()....search the drivers subdirectory for
examples....i am not sure of the differences among these.

> All works perfect, but *very* occasionally upon unregistering (rmmod)
> the module I'll get a segmentation fault.
> I've tried with protecting the module exit code, but still seems to be a
> snag. I'll provide better detail when I post properly.
>
> I hope this post pings OK - this looks to be a great list.
>
>
> Best regards,
> Kris
>
>
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>



-- 
Regards,
Peter Teoh

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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