public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: george anzinger <george@mvista.com>
To: sebastien person <sebastien.person@sycomore.fr>
Cc: liste noyau linux <linux-kernel@vger.kernel.org>
Subject: Re: timer functions
Date: Tue, 31 Jul 2001 23:39:01 -0700	[thread overview]
Message-ID: <3B67A405.1A7CE632@mvista.com> (raw)
In-Reply-To: <20010726170814.5f1aabe8.sebastien.person@sycomore.fr>

sebastien person wrote:
> 
> Hi,
> 
> I have a problem using timers. :-(
> 
> I want to change the function called by the timer :
>         - the first call on the first function works fine
>         - but the second call wich change the function being called
>           give me following error message : "bug: kernel timer added twice at c88cbdd7"
>           and the linux box hang totally
> 
> Is it possible to changed the called function ?
> 
> Any ideas ?
> 
> thanks
> 
> sebastien person
If I understand it, you have an active timer and want to change the
function it calls.  

If the timer is close to expiring, you may have a race with that, but,
in any case, you should be able to just change the function pointer in
the timer structure.  If you are too late, you will find the timer is
free (test by looking for NULL in the list pointer).  The system does
not use or look at the function pointer until it is about to make the
call, i.e. when the timer expires.  You do not have to call any timer
routine to do this, though many would say it is not good practice.

George

      reply	other threads:[~2001-08-01  6:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-26 15:08 timer functions sebastien person
2001-08-01  6:39 ` george anzinger [this message]

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=3B67A405.1A7CE632@mvista.com \
    --to=george@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sebastien.person@sycomore.fr \
    /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