mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: sounak chakraborty <sounakrin@yahoo.co.in>
To: linux-os@analogic.com, linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: repeat a function after fixed time period
Date: Wed, 23 Mar 2005 23:13:24 +0000 (GMT)	[thread overview]
Message-ID: <20050323231324.96262.qmail@web53301.mail.yahoo.com> (raw)
In-Reply-To: 6667


--- linux-os <linux-os@analogic.com> 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);
> >>>
> >>> same race.
> >>
> >> No such race at all.
> >
> > here there is one; you use add_timer() which isn't
> allowed on running
> > timers, only mod_timer() is. So yes there is a
> race.
> >
> 
> Well add_timer() is only executed after the timer
> has expired
> or hasn't started yet so the "isn't allowed" is
> pretty broad.
> If I should use mod_timer(), then there are a _lot_
> of buggy
> drivers in the kernel because that's how a lot
> repeat the
> sequence. Will mod_timer() actually restart the
> timer???
> 
> If so, I'll change it and thank you for the help.
    

   i have applied the code
as i was intedded to call a function repeated ly in
fork.c i written the code over there 
it compiled smoothly 
but while booting 
it is showing
kernel panic no init found
kjournal starting .commit interval after 5 seconds

sounak

________________________________________________________________________
Yahoo! India Matrimony: Find your partner online. http://yahoo.shaadi.com/india-matrimony/

             reply	other threads:[~2005-03-23 23:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-23 23:13 sounak chakraborty [this message]
2005-03-24 12:09 ` linux-os
  -- strict thread matches above, loose matches on Subject: below --
2005-03-23 19:43 sounak chakraborty
2005-03-23 20:23 ` linux-os
2005-03-23 20:48   ` Arjan van de Ven
2005-03-23 20:56     ` linux-os
2005-03-23 21:27       ` Arjan van de Ven
2005-03-23 22:00         ` linux-os
2005-03-24  6:59           ` Arjan van de Ven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050323231324.96262.qmail@web53301.mail.yahoo.com \
    --to=sounakrin@yahoo.co.in \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-os@analogic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®