From: Jan Kiszka <jan.kiszka@domain.hid>
To: xenomai-core <xenomai@xenomai.org>
Subject: [Xenomai-core] [PATCH] Add module param to configure watchdog timeout
Date: Wed, 18 Mar 2009 10:26:18 +0100 [thread overview]
Message-ID: <49C0BE3A.40705@domain.hid> (raw)
This allows to play with larger watchdog timeouts without requiring the
user to recompile the kernel to find out if an overload situation is
permanent or transient.
Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
---
ksrc/nucleus/sched.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/ksrc/nucleus/sched.c b/ksrc/nucleus/sched.c
index e740d26..77f5a4b 100644
--- a/ksrc/nucleus/sched.c
+++ b/ksrc/nucleus/sched.c
@@ -49,6 +49,10 @@ int xnsched_register_class(struct xnsched_class *sched_class)
#ifdef CONFIG_XENO_OPT_WATCHDOG
+static u_long wd_timeout_arg = CONFIG_XENO_OPT_WATCHDOG_TIMEOUT;
+module_param_named(watchdog_timeout, wd_timeout_arg, ulong, 0444);
+MODULE_PARM_DESC(watchdog_timeout, "Watchdog timeout (s)");
+
/*!
* @internal
* \fn void xnsched_watchdog_handler(struct xntimer *timer)
@@ -69,8 +73,8 @@ static void xnsched_watchdog_handler(struct xntimer *timer)
xnsched_reset_watchdog(sched);
return;
}
-
- if (unlikely(++sched->wdcount >= CONFIG_XENO_OPT_WATCHDOG_TIMEOUT)) {
+
+ if (unlikely(++sched->wdcount >= wd_timeout_arg)) {
trace_mark(xn_nucleus, watchdog, "thread %p thread_name %s",
thread, xnthread_name(thread));
xnprintf("watchdog triggered -- killing runaway thread '%s'\n",
reply other threads:[~2009-03-18 9:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=49C0BE3A.40705@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=xenomai@xenomai.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.