Re: repeat a function after fixed time period

2005-03-24 Thread linux-os
On Wed, 23 Mar 2005, sounak chakraborty wrote: --- linux-os <[EMAIL PROTECTED]> wrote: On Wed, 23 Mar 2005, Arjan van de Ven wrote: On Wed, 2005-03-23 at 15:56 -0500, linux-os wrote: static void start_timer(void) { if(!atomic_read(&info->running)) { atomic_inc(&info->running); sa

Re: repeat a function after fixed time period

2005-03-23 Thread Arjan van de Ven
On Wed, 2005-03-23 at 17:00 -0500, linux-os wrote: > On Wed, 23 Mar 2005, Arjan van de Ven wrote: > > > On Wed, 2005-03-23 at 15:56 -0500, linux-os wrote: > static void start_timer(void) > { > if(!atomic_read(&info->running)) > { > atomic_inc(&info->runn

Re: repeat a function after fixed time period

2005-03-23 Thread sounak chakraborty
--- linux-os <[EMAIL PROTECTED]> wrote: > On Wed, 23 Mar 2005, Arjan van de Ven wrote: > > > On Wed, 2005-03-23 at 15:56 -0500, linux-os wrote: > static void start_timer(void) > { > if(!atomic_read(&info->running)) > { > atomic_inc(&info->running); > >>

Re: repeat a function after fixed time period

2005-03-23 Thread linux-os
On Wed, 23 Mar 2005, Arjan van de Ven wrote: On Wed, 2005-03-23 at 15:56 -0500, linux-os wrote: static void start_timer(void) { if(!atomic_read(&info->running)) { atomic_inc(&info->running); same race. No such race at all. here there is one; you use add_timer() which isn't allowe

Re: repeat a function after fixed time period

2005-03-23 Thread Arjan van de Ven
On Wed, 2005-03-23 at 15:56 -0500, linux-os wrote: > >> static void start_timer(void) > >> { > >> if(!atomic_read(&info->running)) > >> { > >> atomic_inc(&info->running); > > > > same race. > > No such race at all. here there is one; you use add_timer() which isn't allowed on r

Re: repeat a function after fixed time period

2005-03-23 Thread linux-os
On Wed, 23 Mar 2005, Arjan van de Ven wrote: This kernel code should do just fine. struct INFO { struct timer_list timer;// For test timer atomic_t running; // Timer is running }; //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Re: repeat a function after fixed time period

2005-03-23 Thread Arjan van de Ven
> > This kernel code should do just fine. > > > > struct INFO { > struct timer_list timer;// For test timer > atomic_t running; // Timer is running > }; > > //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > // > // This s

Re: repeat a function after fixed time period

2005-03-23 Thread linux-os
On Wed, 23 Mar 2005, sounak chakraborty wrote: dear sir i want to call my own function inside the kernel after a fixed interval(i.e some kind of timer) how to do that which function i have to use to repeat the function anather way is that making my own system call which calls my function and this s

repeat a function after fixed time period

2005-03-23 Thread sounak chakraborty
dear sir i want to call my own function inside the kernel after a fixed interval(i.e some kind of timer) how to do that which function i have to use to repeat the function anather way is that making my own system call which calls my function and this sytem call is being access by a user prog