From: Jan Kiszka <jan.kiszka@domain.hid>
To: xenomai-core <xenomai@xenomai.org>
Subject: [Xenomai-core] [PATCH] fix swsusp for gatekeeper thread
Date: Wed, 05 Jul 2006 09:20:53 +0200 [thread overview]
Message-ID: <44AB6855.4030905@domain.hid> (raw)
[-- Attachment #1: Type: text/plain, Size: 1790 bytes --]
Hi,
this is a convenience patch for people like me running Xenomai on their workstation or notebook. It fixes a crash that occurs on suspend to disk/ram via swsusp because the gatekeeper is woken up by the suspension code but has nothing to migrate then.
With this patch applied, you can now suspend your machine as long as no skin is loaded, i.e. the nucleus is passive. When skins are loaded, the system hangs on resume, maybe due to wrong hardware re-initialisation.
Jan
include/asm-generic/wrappers.h | 3 +++
ksrc/nucleus/shadow.c | 2 ++
2 files changed, 5 insertions(+)
Index: include/asm-generic/wrappers.h
===================================================================
--- include/asm-generic/wrappers.h (Revision 1281)
+++ include/asm-generic/wrappers.h (Arbeitskopie)
@@ -161,6 +161,9 @@ struct task_struct;
void show_stack(struct task_struct *task,
unsigned long *sp);
+/* Process suspension */
+#define PF_NOFREEZE 0
+
#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) */
/* VM */
Index: ksrc/nucleus/shadow.c
===================================================================
--- ksrc/nucleus/shadow.c (Revision 1281)
+++ ksrc/nucleus/shadow.c (Arbeitskopie)
@@ -53,6 +53,7 @@
#include <nucleus/ppd.h>
#include <nucleus/trace.h>
#include <asm/xenomai/features.h>
+#include <asm/xenomai/wrappers.h>
int nkthrptd;
@@ -2023,6 +2024,7 @@ int xnshadow_mount(void)
gk->server =
kthread_create(&gatekeeper_thread, gk, "gatekeeper/%d",
cpu);
+ gk->server->flags |= PF_NOFREEZE;
wake_up_process(gk->server);
down(&gk->sync);
}
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]
next reply other threads:[~2006-07-05 7:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-05 7:20 Jan Kiszka [this message]
2006-07-05 8:05 ` [Xenomai-core] [PATCH] fix swsusp for gatekeeper thread Philippe Gerum
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=44AB6855.4030905@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.