All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Daniel Simon <Daniel.Simon@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Posix skin illegal seek on sem_wait
Date: Tue, 25 Apr 2006 17:12:54 +0200	[thread overview]
Message-ID: <17486.15478.535257.678014@domain.hid> (raw)
In-Reply-To: <20060425165423.7b7d231b@domain.hid>

Daniel Simon wrote:
 > On Tue, 25 Apr 2006 15:44:02 +0200
 > Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> wrote:
 > 
 > > The term "Xenomai thread" comes from the document "Life with Adeos":
 > 
 > The shadowing process is not clear in this paper, e.g. bottom of page 6:
 > 
 > <<Xenomai allows to run real-time threads either strictly in kernel
 > space, or within the address space of a Linux process. In the rest of
 > this article, we will refer to the latter as the Xenomai threads, not
 > to be confused with regular Linux tasks (even when they belong to the
 > SCHED_FIFO class).>> 
 > 
 > I guess that "regular Linux tasks unknown to Xenomai, and which
 > only happen to belong to the SCHED_FIFO class" are those compiled and
 > linked against the regular pthread library?

The difference between regular threads and Xenomai threads is rather a
run-time issue than a link-time issue. If Xenomai POSIX skin
pthread_create and pthread_setschedparam services are called with
incorrect arguments (not SCHED_FIFO), they fall back to the services of
the regular posix threading library.

 > 
 > Anyway, my threads are created with the SCHED_FIFO flag; may be there
 > is a conflict with main() which, as I understand, can be only a regular
 > thread?

Real-time shadows are listed in /proc/xenomai/sched; do you see them
there ? You may use pthread_set_name_np to set their name.

 > 
 > >signals sent by the timer_* services will
 > >cause migration of the target thread to secondary mode
 > 
 > I notice that timer_settime(...) also returns an error (perror
 > says "Operation not permitted" while errno is set to 29 "illegal
 > seek", as for the sem_wait)

As documented, if the caller context is invalid, the error should be
EPERM (Operation not permitted), not ESPIPE (illegal seek). Anyway, I am
trying to run your program here to see what is wrong.

 > 
 > >signals [...] cause migration of the target thread to secondary mode
 > 
 > is it only a "not yet implemented" feature or is it a basic
 > conflict between signals and hard real-time?

It is not yet implemented.

-- 


					    Gilles Chanteperdrix.


  reply	other threads:[~2006-04-25 15:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-25 11:43 [Xenomai-help] Posix skin illegal seek on sem_wait Daniel Simon
2006-04-25 13:44 ` Gilles Chanteperdrix
2006-04-25 14:54   ` Daniel Simon
2006-04-25 15:12     ` Gilles Chanteperdrix [this message]
2006-04-25 16:04     ` Gilles Chanteperdrix

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=17486.15478.535257.678014@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=Daniel.Simon@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.