From: Philippe Gerum <rpm@xenomai.org>
To: Jan Kiszka <jan.kiszka@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] [PATCH 0/2] Fix and improve task/thread inquire services
Date: Fri, 17 Oct 2008 09:55:04 +0200 [thread overview]
Message-ID: <48F844D8.3060601@domain.hid> (raw)
In-Reply-To: <48F84233.1050003@domain.hid>
Jan Kiszka wrote:
> Jan Kiszka wrote:
>> Philippe Gerum wrote:
>>> Jan Kiszka wrote:
>>>> Gilles Chanteperdrix wrote:
>>>>> Jan Kiszka wrote:
>>>>>> This series fixes the issues around rt_task_inquire I posted yesterday.
>>>>>> Additionally, it introduces an analogous services pthread_inquire_np for
>>>>>> the POSIX skin. That allows, among other things, to implement test cases
>>>>>> for the upcoming fast xnsynch/mutex patches.
>>>>> Ok. Since this applies only for debugging purpose, and displaying
>>>>> whether a task is in primary mode may be use badly by users, maybe we
>>>>> should make this service a shadow syscall, and not export any interface
>>>>> to use it. This would further avoid duplication between the native and
>>>>> posix skins.
>>>> Debugging is not the holy, exclusive business of Xenomai hackers.
>>>>
>>>> The inquire services are useful in libraries as well, when you want to
>>>> check if the caller complies to the call convention ("don't use in
>>>> primary mode", "caller's priority must not exceed X" or whatever).
>>>>
>>>> That said, I'm open for unifying the code, maybe introducing some
>>>> xnthread_inquire.
>>>>
>>> That would be much better than publishing an open interface to fiddle even more
>>> with thread modes via rt_task_set_mode(). I would definitely merge that.
>> Code refactoring is no problem, will work that out. I just want to keep
>> the user interface.
>
> Looking into this, I come to the conclusion that xnthread_inquire is
> only then a gain if both rt_task_inquire and pthread_inquire_np use the
> same data structure layout. And that means that both need to use the
> same time encodings, not struct timespec vs. RTIME like it is now. That
> would not be beautiful, but feasible (e.g. picking __u64 as type,
> passing nanoseconds). Still, it does not yet convince me.
>
The idea behind xnthread_inquire() is not about replacing rt_task_inquire()
under the hood, but rather to get back only fundamental values, such as the
current thread status, in order to determine whether XNRELAX is set or not for
instance.
XENOMAI_SYSCALL1(__xn_sys_inquire) => xnthread_inquire(xnpod_current_thread())
> Jan
>
--
Philippe.
next prev parent reply other threads:[~2008-10-17 7:55 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-16 14:57 [Xenomai-core] [PATCH 0/2] Fix and improve task/thread inquire services Jan Kiszka
2008-10-16 14:57 ` [Xenomai-core] [PATCH 1/2] Fix status values reported by rt_task_inquire Jan Kiszka
2008-10-16 14:57 ` [Xenomai-core] [PATCH 2/2] Add pthread_inquire_np service Jan Kiszka
2008-10-16 15:40 ` [Xenomai-core] [PATCH 0/2] Fix and improve task/thread inquire services Gilles Chanteperdrix
2008-10-16 15:53 ` Jan Kiszka
2008-10-16 20:09 ` Philippe Gerum
2008-10-16 22:00 ` Jan Kiszka
2008-10-17 7:43 ` Jan Kiszka
2008-10-17 7:55 ` Philippe Gerum [this message]
2008-10-17 8:19 ` Jan Kiszka
2008-10-17 8:42 ` Philippe Gerum
2008-10-17 9:27 ` Jan Kiszka
2008-10-17 9:59 ` Philippe Gerum
2008-10-17 11:10 ` Jan Kiszka
2008-10-17 13:24 ` 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=48F844D8.3060601@domain.hid \
--to=rpm@xenomai.org \
--cc=jan.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.