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: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to