From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: rob@domain.hid
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] mlockall questions
Date: Wed, 9 Apr 2008 21:29:16 +0200 [thread overview]
Message-ID: <18429.6412.785941.128928@domain.hid> (raw)
In-Reply-To: <000701c89a75$d349f630$9601a8c0@domain.hid>
Robert McCullough wrote:
> Hi,
>
> I am converting part of a C++ application to real-time.
>
> I noticed that all the Xenomai examples call
> mlockall(MCL_CURRENT|MCL_FUTURE) at the beginning of main before creating
> any real-time threads.
> Is calling mlockall a requirement when using Xenomai?
Yes it is.
>
> I have added a couple of Xenomai tasks to my C++ app.
> A) Without calling mlockall my application seems to run fine but I noticed
> in /proc/xenomai/stat that a few page faults occurred.
Well normally your application should stop with a message telling you
that you have not call mlockall. Do you happen to install a handler for
SIGXCPU ?
> B) When calling mlockall at the beginning of my main() I do not see any page
> faults but some of the C++ threads do not start.
>
> Why would mlockall cause some threads not to start?
Well, you should check rt_task_create or pthread_create return
value. The usual error is that you run out of memory because of the
stack size problem explained in the TROUBLESHOOTING guide.
--
Gilles.
next prev parent reply other threads:[~2008-04-09 19:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-09 19:13 [Xenomai-help] mlockall questions Robert McCullough
2008-04-09 19:29 ` Gilles Chanteperdrix [this message]
2008-04-09 21:36 ` Robert McCullough
2008-04-10 0:53 ` Philippe Gerum
2008-04-10 9:25 ` Gilles Chanteperdrix
2008-04-10 14:36 ` Philippe Gerum
2008-04-10 15:43 ` Gilles Chanteperdrix
2008-04-10 17:26 ` Gilles Chanteperdrix
2008-04-10 17:52 ` jeff koftinoff
2008-04-10 18:03 ` Gilles Chanteperdrix
2008-04-10 18:16 ` Gilles Chanteperdrix
2008-04-10 22:48 ` Philippe Gerum
2008-04-10 22:54 ` Philippe Gerum
2008-04-10 23:25 ` Gilles Chanteperdrix
2008-04-10 23:31 ` Philippe Gerum
2008-04-14 19:51 ` Robert McCullough
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=18429.6412.785941.128928@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=rob@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.