All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Zara Tustra <zarawesome@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Confusion regarding linux/xenomai tasks
Date: Fri, 13 Feb 2009 18:07:27 +0000	[thread overview]
Message-ID: <4995B6DF.1070102@domain.hid> (raw)
In-Reply-To: <57e813c90902130946p362eeb18m3141b31fc6aee873@domain.hid>

Zara Tustra wrote:
> I've read some information regarding the difficulty of communication between
> Linux threads and Xenomai tasks, and I've had some misinformation fired at
> me from co-workers. I just want to make some points clear:
> 
> 1) Can a Linux application launch Xenomai tasks, or I've horribly misread
> things somewhere? My understanding is that Xenomai tasks are commonly
> activated by a Linux process.

Yes.

> 
> 2) Can real-time Xenomai tasks started by a Linux application communicate
> with it through the global variables of that application?

Task is vague. We usually talk about threads or processes and task may
mean either. I guess you mean threads. Yes, Xenomai threads and Linux
threads share the same address space if they are part of the same
process. But beware to locking. If you want to protect the shared
variables with a mutex for instance. If it is a Linux mutex, using it
from a Xenomai thread will cause it to be "demoted". If it is a Xenomai
mutex, then all threads that use it will need to be Xenomai threads,
this is the way this issue is usually solved, which means that there are
som Xenomai threads which have lower priorites.

> 
> 3) What happens if I make a syscall or similar non-real-time call from a
> Xenomai task? Is the task automatically 'demoted' to non-real-time?

yes.

> How can I tell?

You can ask to be notified by using a signal, see rt_task_mode or
pthread_set_mode_np.

-- 
                                                 Gilles.


      parent reply	other threads:[~2009-02-13 18:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-13 17:46 [Xenomai-help] Confusion regarding linux/xenomai tasks Zara Tustra
2009-02-13 18:04 ` Philippe Gerum
2009-02-13 18:37   ` Zara Tustra
2009-02-13 18:07 ` Gilles Chanteperdrix [this message]

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=4995B6DF.1070102@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=xenomai@xenomai.org \
    --cc=zarawesome@domain.hid \
    /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.