All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: "Li Yi (Adam)" <liyiadam@domain.hid>
Cc: xenomai-help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] Sychronize between Linux and Xenomai domain
Date: Mon, 10 Jul 2006 09:11:57 +0200	[thread overview]
Message-ID: <44B1FDBD.4060600@domain.hid> (raw)
In-Reply-To: <4546494d0607092316s7dbc7406j2436714deccbfb91@domain.hid>

[-- Attachment #1: Type: text/plain, Size: 1161 bytes --]

Li Yi (Adam) wrote:
> Hi,
> 
> Xenomai provides synchronize objects like semaphore and mutex and related
> APIs, e.g: rt_sem_p(), rt_sem_v().
> I think they can only synchonze between Xenomai tasks (e.g, tasks created
> with rt_task_create()).
> 
> Is there any way to synchonize between a "normal" Linux task and a Xenomai
> task?

Either by simply calling a standard sync-mechanism from the RT task so
that it switches over to secondary mode, or by mapping the Linux task to
a Xenomai task as well. The latter is simple too, and you can even leave
its Linux scheduling policy at SCHED_OTHER with latest Xenomai (upcoming
2.2).

> Is there way to synchronize between Linux and Xenomai domain in Kernel
> space? (e.g, a Linux driver and a Xenomai driver)?

Depends on what you have to protect. The easiest way for short code
passages are still spinlocks with hard IRQ protection (under RTDM:
rtdm_lock_xxx). If it's a more complex scenario, please describe it.
There are several patterns available that may fit. They reach from
polling in the non-RT context over virtual IRQs to Linux
(rtdm_nrtsig_xxx) up to RT helper tasks.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

  reply	other threads:[~2006-07-10  7:11 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-10  6:16 [Xenomai-help] Sychronize between Linux and Xenomai domain Li Yi (Adam)
2006-07-10  7:11 ` Jan Kiszka [this message]
2006-07-10  8:48   ` Li Yi (Adam)
2006-07-10  9:07     ` Jan Kiszka
2006-07-10  9:31       ` Li Yi (Adam)
2006-07-10  9:44         ` Jan Kiszka
2006-07-11  4:25           ` Li Yi (Adam)
2006-07-11  6:14             ` Jan Kiszka
2006-07-11  6:48               ` Li Yi (Adam)
2006-07-11  6:53                 ` Li Yi (Adam)
2006-07-11  7:29                   ` Jan Kiszka
2006-07-11  7:43                     ` Li Yi (Adam)
2006-07-11  7:47                       ` Jan Kiszka
2006-07-12  1:51                       ` Li Yi (Adam)
2006-07-12  6:34                         ` Jan Kiszka
2006-07-12  7:34                           ` Li Yi (Adam)
2006-07-12  7:51                             ` Jan Kiszka
2006-07-12  8:24                               ` Li Yi (Adam)
2006-07-12  8:51                                 ` Jan Kiszka
2006-07-14  8:37             ` 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=44B1FDBD.4060600@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=liyiadam@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.