From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: yibo dai <strlcopy@domain.hid>
Cc: Xenomai-help@domain.hid
Subject: Re: [Xenomai-help] xenomai thread crash
Date: Fri, 04 Nov 2011 15:11:35 +0100 [thread overview]
Message-ID: <4EB3F297.2090403@domain.hid> (raw)
In-Reply-To: <CAEcCJg_RWVBVzF5S=K+fdSvO1cQph7Haf2L8jkSxRsf+-g-Mkg@domain.hid>
On 11/04/2011 03:42 AM, yibo dai wrote:
> In my current project, there is a xenomai thread in the user space,It
> doing the following things:
> 1.recieve the TIPC message from other services then handle it
> 2.recieve the packet from RTNet then handle it
> Program is probably as follows:
> while(1) {
> select(...); /*block and waiting for TIPC messages */
> /*do something*/
>
> do {
> ret = rt_dev_recvmsg(...,MSG_DONTWAIT); /*recieve packets from RTNet*/
> /* do something */
> } while(ret > 0);
> }
>
> the RTNet stack will trigger a virtual interrupt(use the
> rtdm_nrtsig_pend) when recieved a packet,then the virtual interrupt
> handler will send a SIGUSR2 to the xenomai thread,...,at last the
When you do that, you cause the real-time thread to switch to secondary
mode, it means, it is no longer real-time, and using RTnet is in fact
pointless.
> xenomai thread wake up.the problem is the xenomai thread will crash
> when calling rt_dev_recvmsg sometimes.i found that
> ops->operation##_nrt(i.e. ops->recvmsg_nrt) will be call(in the
> MAJOR_FUNCTION_WRAPPER_TH),but ops->recvmsg_nrt is NULL,so the xenomai
> thread crash.
It is hard to say anything without seeing any code.
> is my usage wrong?
Yes.
why the current domain become linux when executing
> xenomai syscall?
Because you are executing a syscall which does so, not all syscalls do that.
by the way,what is the reason to remove
> CONFIG_XENO_OPT_ISHIELD?
It had problems of its own. Beside, it gave the false impression that
thread could have some real-time guarantees in secondary mode.
--
Gilles.
next prev parent reply other threads:[~2011-11-04 14:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-04 2:42 [Xenomai-help] xenomai thread crash yibo dai
2011-11-04 14:11 ` Gilles Chanteperdrix [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-11-04 3:01 yibo dai
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=4EB3F297.2090403@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=Xenomai-help@domain.hid \
--cc=strlcopy@domain.hid \
/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.