Skip to contentSkip to conversation

/native/demos/satch hangs

Xenomai-core Daniel Simon 2 participants 2 messages May 5, 2006 – May 8, 2006

lore
Share & tools
lore
#0 lore raw

Hello,

I am trying xenomai on a Compaq N600c laptop, kernel 2.6.15 patched against xenomai-2.1.0 (config file attached).

Most tests run succesfully (i.e., /usr/xenomai/testsuite/* and xenomai/ksrc/skins/posix/demos/accuracy*)

However, (and after complaining about libnative.so.0 and running ldconfig) the satch test found in $xenomai/ksrc/skins/native/demos/ immediately hangs the pc... It seems to be definitively locked despite the watchdog.

What may be the reason?

Daniel

Signature · 9 lines
***********The difference between theory and practice****************
**************is larger in practice than in theory*******************

      Daniel SIMON    Projet POP ART  INRIA Rhone-Alpes
ZIRST, 655 avenue de l'Europe, 38330 MONTBONNOT SAINT MARTIN, FRANCE 
 [email protected] Phone:(33)476615328 Fax:(33)476615252
	 http://pop-art.inrialpes.fr/people/simon/

*********************************************************************
#1 lore raw
Quoted 8 lines · Daniel Simon

Hello,

I am trying xenomai on a Compaq N600c laptop, kernel 2.6.15 patched against xenomai-2.1.0 (config file attached).

Most tests run succesfully (i.e., /usr/xenomai/testsuite/* and xenomai/ksrc/skins/posix/demos/accuracy*)

Quoted 6 lines

However, (and after complaining about libnative.so.0 and running ldconfig) the satch test found in $xenomai/ksrc/skins/native/demos/ immediately hangs the pc... It seems to be definitively locked despite the watchdog.

What may be the reason?

The warnings when compiling the example give the answer. The patch below makes this code work; it has been fixed in later releases.

ksrc/skins/native/demos/satch.c 2006-03-19 18:30:34.000000000 +0100 renamed from ksrc/skins/native/demos/satch.c 2006-02-03 23:34:14.000000000 +0100 +3 -1
@@ -1,3 +1,4 @@
+#include <sys/mman.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <string.h>
@@ -88,7 +89,7 @@
 int root_thread_init (void)
 
 {
-    rt_timer_start(1000000);   /* 1ms periodic tick. */
+    rt_timer_set_mode(1000000);        /* Forc 1ms periodic tick. */
 
     rt_task_spawn(&consumer_task,
                  "ConsumerTask",
@@ -120,6 +121,7 @@
 int main (int ac, char *av[])
 
 {
+    mlockall(MCL_CURRENT|MCL_FUTURE);
     root_thread_init();
     pause();
     root_thread_exit();
Signature · 1 line
Philippe.