All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vincent Levesque <vleves@domain.hid>
To: rpm@xenomai.org
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Writing from user space direct to IO	Ports	without mode switches
Date: Thu, 19 Jul 2007 17:10:30 -0400	[thread overview]
Message-ID: <469FD346.4060402@domain.hid> (raw)
In-Reply-To: <1184755654.13258.17.camel@domain.hid>

Hi Philippe,
> Excepts from your code:
>   while(!end){
>     //switch to primary mode
>     ret = rt_task_set_mode(0, T_PRIMARY, NULL);
>
> Damnit. I knew this particular interface was going to be misused most of
> the time. In short: do ____NOT_____ switch modes manually, this is
> useless because Xenomai syscalls do it for you, and even sub-optimal
> because the kernel knows better when it needs it and saves you a syscall
> when required. The T_PRIMARY bit has been solely provided for internal
> Xenomai purposes (some Xenomai libs have very special requirements in
> very rare cases). rt_task_wait_period() will switch to primary mode if
> needed, and always leave you in primary upon return.
>   
Indeed, I was also doing the same thing. From my understanding of the 
docs, I assumed that manually setting a task to secondary mode was 
allowed and could improve performance. Take for instance a task that 
logs data coming from a RT_QUEUE to a file. Is there anything special 
that should be done to minimize the impact of the frequent mode switches 
in such a case?

Thanks,

Vincent Levesque
vleves@domain.hid


  reply	other threads:[~2007-07-19 21:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-17 22:23 [Xenomai-help] Writing from user space direct to IO Ports without mode switches Renner Johannes
2007-07-18  6:47 ` Gilles Chanteperdrix
2007-07-18 10:19   ` [Xenomai-help] Writing from user space direct to IO Ports withoutmode switches Renner Johannes
2007-07-18  8:22 ` [Xenomai-help] Writing from user space direct to IO Ports without mode switches Philippe Gerum
2007-07-18 10:12   ` Renner Johannes
2007-07-18 10:47     ` Philippe Gerum
2007-07-19 21:10       ` Vincent Levesque [this message]
2007-07-20  7:47         ` Jan Kiszka
2007-07-20 19:28           ` Vincent Levesque

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=469FD346.4060402@domain.hid \
    --to=vleves@domain.hid \
    --cc=rpm@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.