* [Xenomai-core] [PATCH] fix swsusp for gatekeeper thread
@ 2006-07-05 7:20 Jan Kiszka
2006-07-05 8:05 ` Philippe Gerum
0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2006-07-05 7:20 UTC (permalink / raw)
To: xenomai-core
[-- 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 --]
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [Xenomai-core] [PATCH] fix swsusp for gatekeeper thread
2006-07-05 7:20 [Xenomai-core] [PATCH] fix swsusp for gatekeeper thread Jan Kiszka
@ 2006-07-05 8:05 ` Philippe Gerum
0 siblings, 0 replies; 2+ messages in thread
From: Philippe Gerum @ 2006-07-05 8:05 UTC (permalink / raw)
To: Jan Kiszka; +Cc: xenomai-core
On Wed, 2006-07-05 at 09:20 +0200, Jan Kiszka wrote:
> 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.
>
Merged, thanks.
--
Philippe.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-07-05 8:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-05 7:20 [Xenomai-core] [PATCH] fix swsusp for gatekeeper thread Jan Kiszka
2006-07-05 8:05 ` Philippe Gerum
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.