All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Xenomai 2.0.1 - Posix Skin - realtime priorities -	what I'm doing wrong?
Date: Fri, 9 Dec 2005 22:29:47 +0100	[thread overview]
Message-ID: <17305.63307.340805.330709@domain.hid> (raw)
In-Reply-To: <4399E716.8060502@domain.hid>

Paolo Gai wrote:
 > Gilles Chanteperdrix wrote:
 > >Working around this issue means using calls to unlocked versions of libc
 > >functions protected with Xenomai POSIX mutexes, such as, for example,
 > >myputs and myputchar (sufficient for Paolo example) defined as :
 > >[...]
 > >  
 > >
 > Ok! I tried it, and I also tried another slightly modified version of 
 > the demo, that simply replaces putchars with an unprotected array of 
 > chars (let's suppose there are no race conditions) that is printed out 
 > to stdout at the end of the game.

There is no race condition in the SCHED_FIFO case or ahem, there should
be none. Please also note that the "volatile" qualifier seem misplaced
in your declaration of buf_current, it may matter since the compiler
will probably inline calls to myputchar in the "medium" function, and
buf_current will end up in a register. But this would have no effect
only in the SCHED_FIFO case.


 > the results are the following, where the first part is RR and the second 
 > is FIFO (it's quite strange for me that FIFO has more contect changes 
 > than RR (?))

Please also note that any thread created with the SCHED_RR attribute
will be a plain Linux thread, and due to a bug in glibc, the thread will
use the default policy. The results are strange indeed for SCHED_FIFO,
it may be a bug, this needs a closer look... Maybe threads are not
Xenomai threads using SCHED_FIFO policy at all ?

-- 


					    Gilles Chanteperdrix.


  reply	other threads:[~2005-12-09 21:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-09 14:33 [Xenomai-help] Xenomai 2.0.1 - Posix Skin - realtime priorities - what I'm doing wrong? Paolo Gai
2005-12-09 15:50 ` Ulrich Schwab
2005-12-09 18:05   ` Gilles Chanteperdrix
2005-12-09 20:20     ` Paolo Gai
2005-12-09 21:29       ` Gilles Chanteperdrix [this message]
2005-12-10 10:53         ` Paolo Gai
2005-12-10 11:14           ` Paolo Gai
2005-12-11 21:34           ` Gilles Chanteperdrix
2005-12-09 15:58 ` [Xenomai-help] Boot problem V2.0.1 with Kernel 2.6.12 Stephan Zimmermann
2005-12-10 10:55   ` 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=17305.63307.340805.330709@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --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.