From: george anzinger <george@mvista.com>
To: "X.Xiao" <joyhaa@yahoo.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: Dynamic Timer
Date: Mon, 17 Jun 2002 15:27:51 -0700 [thread overview]
Message-ID: <3D0E6267.F5CE4E74@mvista.com> (raw)
In-Reply-To: 20020617204127.62122.qmail@web13203.mail.yahoo.com
"X.Xiao" wrote:
>
> I have two questions about dynamic timer in Linux:
> 1. Kernel space: After add_timer is used, where is the
> code used to poll the global 'struct timer_list' to
> activate the related functions on time? It's not in
> sched.c, is it in tasklet/bh?
The "code" is in timer.c (same place you found "add_timer())
and is called run_timer_list(). It is called by timer_bh()
also in timer.c, which is scheduled by do_timer() (also in
timer.c) which is called each timer interrupt by code in the
arch/kernel/ area (in i386 it is time.c) which, in turn is
called by the interrupt code.
> 2. User space: is there a way to set a dynamic timer
> in userspace as well, such as create_timer(posix, not
> in Linux)?
The tried and true way is the setitimer() call. The POSIX
calls are also available as a patch from the high-res-timers
project (see signature).
--
George Anzinger george@mvista.com
High-res-timers:
http://sourceforge.net/projects/high-res-timers/
Real time sched: http://sourceforge.net/projects/rtsched/
Preemption patch:
http://www.kernel.org/pub/linux/kernel/people/rml
prev parent reply other threads:[~2002-06-17 22:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-17 19:47 [patch] 2.5.22 add __fput for aio Benjamin LaHaise
2002-06-17 20:11 ` Linus Torvalds
2002-06-17 20:19 ` Benjamin LaHaise
2002-06-17 20:22 ` Linus Torvalds
2002-06-17 20:41 ` Dynamic Timer X.Xiao
2002-06-17 22:27 ` 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=3D0E6267.F5CE4E74@mvista.com \
--to=george@mvista.com \
--cc=joyhaa@yahoo.com \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.