From: Jan Kiszka <jan.kiszka@domain.hid>
To: "Brian L." <bluczkie@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] General question on Native Skin tasks
Date: Wed, 19 Apr 2006 19:18:01 +0200 [thread overview]
Message-ID: <444670C9.6050207@domain.hid> (raw)
In-Reply-To: <6ee4c8380604190827q76a1442du59c90b2515f71cdd@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 1683 bytes --]
Brian L. wrote:
>> Why do you create the non-rt threads also via rt_task_create? This just
>> introduces unneeded load on the RT subsystem.
>
> I was under the impression that to interact with xenomai objects
> (RT_QUEUE, RT_MUTEX, etc), I needed to be in a xenomai thread. I
> assumed that because every mutex implementation I've seen has relied
> heavily on the underlying thread library (i.e. to sleep or yield) and
> mixing thread libraries seemed like a bad idea.
>
> So, is this what you're suggesting:
>
> - Link against pthreads AND native
By linking against native, you implicitly also link against pthread
(native threads are based on pthreads).
> - Start non-realtime threads using pthread_create and real-time
> threads using rt_task_create/rt_task_start
Yep.
> - use RT_MUTEX's/RT_QUEUE's for situations in which there is
> contention/communication among realtime and nonrealtime threads
Yes, but when blocking native services are invoked, the caller has to be
a native thread again. Only pure non-RT threads with no shared critical
paths can be plain pthreads. When in doubt, study the native
documentation regarding allowed contexts. The statement "switches to
primary mode" indicates that a native thread is required.
> - use pthreads mutexes/queues for situations of
> contention/communication among non-realtime threads
That's totally fine and also improve the efficiency (something that has
to be sacrificed for determinism sometimes).
>
> It sounds workable to me, assuming the queues/mutexes/etc. don't stop
> working when both threading libraries are involved.
Hope I could clarify the situation.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
next prev parent reply other threads:[~2006-04-19 17:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-16 18:10 [Xenomai-help] General question on Native Skin tasks Brian L.
2006-04-17 13:33 ` Jan Kiszka
2006-04-17 14:50 ` Philippe Gerum
2006-04-17 17:35 ` Philippe Gerum
2006-04-17 20:03 ` Jan Kiszka
2006-04-17 20:44 ` Jan Kiszka
2006-04-18 19:53 ` Brian L.
2006-04-18 21:04 ` Jan Kiszka
2006-04-19 15:27 ` Brian L.
2006-04-19 17:18 ` Jan Kiszka [this message]
2006-04-19 17:42 ` Brian L.
2006-04-19 19:45 ` Jan Kiszka
2006-04-20 3:09 ` Li Yi
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=444670C9.6050207@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=bluczkie@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.