From: Jan Kiszka <jan.kiszka@domain.hid>
To: robert165 <robert165@domain.hid>
Cc: xenomai-help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] Sleep in rtdm driver
Date: Wed, 17 Mar 2010 16:05:33 +0100 [thread overview]
Message-ID: <4BA0EFBD.4040500@domain.hid> (raw)
In-Reply-To: <132c37c.bd80.1276c73c215.Coremail.robert165@domain.hid>
robert165 wrote:
> Hi everyone!
>
> I'm writing a gpio driver in RTDM. I start it with the demo "Hard real time RTDM driver skeleton v1.1" of Jan Kiszka.
> If I used rtdm_task_sleep in rt_ioctrl function, it return that "Xenomai: assertion failed at kernel/xenomai/skins/rtdm/drvlib.c:372 (!xnpod_unblockable_p())" when running.
> It is said that rtdm_task_sleep can be called from Kernel-based task. Why I can't use it in my driver. Optionally, I can do this in user-space by periodic calling the driver, but it seems slower than in kernel space.
The terms "kernel-based task" or "user space task" can be misleading.
This services requires a real-time task context. That can either be a
kernel-based *RT* task or a Xenomai shadow (aka *RT*) task in user space
that has invoked some driver service, and that driver can then call
rtdm_task_sleep on behalf of the user space task.
Blocking RTDM service *must not* be called by ordinary Linux kernel
threads or on behalf of ordinary (non-shadowed) Linux user space
threads. That's why the assertion failed for you.
HTH,
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2010-03-17 15:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-07 20:43 [Xenomai-help] Analogy vs Comedi Jaryn Sepesi
2010-02-07 21:27 ` Alexis Berlemont
2010-03-17 14:07 ` [Xenomai-help] Sleep in rtdm driver robert165
2010-03-17 15:05 ` Jan Kiszka [this message]
2010-03-18 8:33 ` robert165
2010-03-17 16:19 ` Philippe Gerum
-- strict thread matches above, loose matches on Subject: below --
2010-03-18 12:02 robert165
2010-03-18 15:18 ` Jan Kiszka
2010-03-19 4:17 ` robert165
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=4BA0EFBD.4040500@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=robert165@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.