All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Huan Fang <huanf@domain.hid>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] RTDM rtdm_task_sleep in kernel not always wakes up
Date: Sat, 13 Mar 2010 13:08:00 +0100	[thread overview]
Message-ID: <4B9B8020.1080605@domain.hid> (raw)
In-Reply-To: <B66DE711C138E84F96E6A2EDD078830B5F2A4D39CB@MAIL02.ug.kth.se>

Huan Fang wrote:
> Hello. I am writing a driver using RTDM. Just for testing, I have a
> rt kernel thread waiting for event signal sent from nrt_ioctl. After
> the thread is activated, it calls rtdm_task_busy_sleep(100000); then 
> rtdm_task_sleep(100000); When the RT thread is really sleeping, the
> nrt_ioctl resumes and sleeps via wait_event_interruptible_timeout(2
> jiffiles).
> 
> Normally, RT thread wakes up after 100us. But the thread seems to
> hang after 20-30 such loops and never wake up. When I kill the
> process. I saw that wait_event_interruptible_timeout returns a -512.
>  The worse thing is I saw kernel panic sometimes during such context
> switches.

Hi,

If you are using wait_event_interruptible_timeout from the context of a
xenomai thread running in primary mode, it is normal to get kernel
oopses. If you do not do that, then I did not get your explanation, and
I think the best thing to do is to send us a self contained example,
including driver code and user-space code. Something that we can compile
and run to see what you are observing.

Regards.

-- 
					    Gilles.


  reply	other threads:[~2010-03-13 12:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-12 18:21 [Xenomai-help] RTDM rtdm_task_sleep in kernel not always wakes up Huan Fang
2010-03-13 12:08 ` Gilles Chanteperdrix [this message]
2010-03-16 15:15   ` Huan Fang

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=4B9B8020.1080605@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=huanf@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.