linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* timer functions
@ 2001-07-26 15:08 sebastien person
  2001-08-01  6:39 ` george anzinger
  0 siblings, 1 reply; 2+ messages in thread
From: sebastien person @ 2001-07-26 15:08 UTC (permalink / raw)
  To: liste noyau linux

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: timer functions
  2001-07-26 15:08 timer functions sebastien person
@ 2001-08-01  6:39 ` george anzinger
  0 siblings, 0 replies; 2+ messages in thread
From: george anzinger @ 2001-08-01  6:39 UTC (permalink / raw)
  To: sebastien person; +Cc: liste noyau linux

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-08-01  6:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-26 15:08 timer functions sebastien person
2001-08-01  6:39 ` george anzinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).