All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Daniel Simon <Daniel.Simon@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] /native/demos/satch hangs
Date: Mon, 08 May 2006 15:58:38 +0200	[thread overview]
Message-ID: <445F4E8E.2090007@domain.hid> (raw)
In-Reply-To: <20060505121832.7e4ca460@domain.hid>

Daniel Simon wrote:
> 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?

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

--- xenomai-2.1.0/ksrc/skins/native/demos/satch.c       2006-02-03 
23:34:14.000000000 +0100
+++ xenomai-2.1.50/ksrc/skins/native/demos/satch.c      2006-03-19 
18:30:34.000000000 +0100
@@ -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();
-- 

Philippe.


      reply	other threads:[~2006-05-08 13:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-05 10:18 [Xenomai-core] /native/demos/satch hangs Daniel Simon
2006-05-08 13:58 ` Philippe Gerum [this message]

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=445F4E8E.2090007@domain.hid \
    --to=rpm@xenomai.org \
    --cc=Daniel.Simon@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.