From: "Ignacio García Pérez" <iggarpe@domain.hid>
To: Jan Kiszka <kiszka@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] timeout in native API calls (cond, sem, mutex, etc).
Date: Fri, 21 Oct 2005 16:40:47 +0200 [thread overview]
Message-ID: <4358FDEF.5020800@domain.hid> (raw)
In-Reply-To: <4358DC25.9010307@domain.hid>
Jan Kiszka wrote:
>Ignacio García Pérez wrote:
>
>
>>In my previous (long) message I forgot something. I think that without
>>support for abolute timeouts in the nucleus, the RTAI skin cannot be
>>accurately implemented (*_until and *_timed calls).
>>
>>
>>
>
>Then something must be wrong, e.g. here: ;)
>
>http://www.rts.uni-hannover.de/xenomai/lxr/source/skins/rtdm/drvlib.c?v=SVN#L280
>(other skins do it similar but have to deal with more complexity)
>
>I does work as you can see, it just takes some locking. :)
>
>
Um. I meant it cannot be properly done in a user application.
One of the best things of xenomai is the neat layered design. In theory
(again, correct this newbie if he's wrong),* the application developer
should use only the API provided by the skin he chooses. The nucleus
services should be used only by skin developers.*
So, it's perfectly ok that the RTDM developer uses the locking mechanism
provided by the nucleus.
But I think that I, as an application developer using the native skin,
should not need to resort to the nucleus to implement a certain basic RT
functionality (and yes, I agree it is a quite rare design pattern, but
it's there).
As I discuss in another message, I think the best (and easy!) solution
from the design standpoint would be to modify all nucleus calls that
take a timeout argument and add a boolean argument to specify whether
the timeout is realtive or absolute. Would be almost trivial to
implement, however:
- Would break the nucleus API, THOUGH the required updates in the skins
would be TRIVIAL (just add a zero/one after the timeout). Later, some
calls like the RTDM one you mention could be further optimized by using
the absolute timeout nucleus call instead of the locking.
- Would require modifications of the documentation. Since it's generated
with doxygen, and the code changes are trivial, this would be probably
the largest job.
The nucleus API would suffer a minimal change (no new calls, just a new
parameter in ones) and would provide quite a large amount of
flexibility. Extending the native skip API would be the next step, and
if the project leader decides not to do it, that would be OK because I
could do it only for myself via a tiny patch.
>Well, it's not that accurate as it could be at best, that's true, but
>the short time you "loose" between the conversions in the skin and the
>nucleus is not significant compared to the overall jitter you always
>face on an OS.
>
>Jan
>
>
>
next prev parent reply other threads:[~2005-10-21 14:40 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-20 16:20 [Xenomai-help] timeout in native API calls (cond, sem, mutex, etc) Ignacio García Pérez
2005-10-20 16:46 ` Jan Kiszka
2005-10-20 17:09 ` Ignacio García Pérez
2005-10-20 17:33 ` Jan Kiszka
2005-10-20 18:18 ` Philippe Gerum
2005-10-20 18:16 ` Philippe Gerum
2005-10-21 7:20 ` Ignacio García Pérez
2005-10-21 10:29 ` Philippe Gerum
2005-10-21 12:02 ` Ignacio García Pérez
2005-10-21 10:51 ` Ignacio García Pérez
2005-10-21 12:23 ` Jan Kiszka
2005-10-21 14:46 ` Ignacio García Pérez
2005-10-21 16:45 ` Philippe Gerum
2005-10-21 16:39 ` Philippe Gerum
2005-10-21 18:55 ` Ignacio García Pérez
2005-10-21 10:52 ` Ignacio García Pérez
2005-10-21 12:16 ` Jan Kiszka
2005-10-21 14:40 ` Ignacio García Pérez [this message]
2005-10-21 16:42 ` Philippe Gerum
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=4358FDEF.5020800@domain.hid \
--to=iggarpe@domain.hid \
--cc=kiszka@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.