* [Xenomai] how to force task switch to primary mode
@ 2015-11-25 17:20 JK.Behnke
2015-11-25 17:40 ` Johann Obermayr
2015-11-28 11:31 ` Gilles Chanteperdrix
0 siblings, 2 replies; 3+ messages in thread
From: JK.Behnke @ 2015-11-25 17:20 UTC (permalink / raw)
To: xenomai
Hello,
an rtdm driver that I use requires the rt_dev_open call to be executed
in primary mode.
With xenomai 2.4.2 it was possible to switch to primary mode using
rt_task_set_mode(0, T_PRIMARY, NULL);
Now I use xenomai 2.6.3, but I can't find the T_PRIMARY flag.
Is there an other alternative to force the task to switch to primary
mode?
Would I have to change the rtdm driver, so xenomai performs the mode
switch automatically?
Thanks in advance for any hint.
Jochen
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Xenomai] how to force task switch to primary mode
2015-11-25 17:20 [Xenomai] how to force task switch to primary mode JK.Behnke
@ 2015-11-25 17:40 ` Johann Obermayr
2015-11-28 11:31 ` Gilles Chanteperdrix
1 sibling, 0 replies; 3+ messages in thread
From: Johann Obermayr @ 2015-11-25 17:40 UTC (permalink / raw)
To: Xenomai
Hello,
Am 25.11.2015 um 18:20 schrieb JK.Behnke@web.de:
> Hello,
>
> an rtdm driver that I use requires the rt_dev_open call to be executed
> in primary mode.
> With xenomai 2.4.2 it was possible to switch to primary mode using
> rt_task_set_mode(0, T_PRIMARY, NULL);
>
> Now I use xenomai 2.6.3, but I can't find the T_PRIMARY flag.
> Is there an other alternative to force the task to switch to primary
> mode?
>
> Would I have to change the rtdm driver, so xenomai performs the mode
> switch automatically?
>
> Thanks in advance for any hint.
> Jochen
> _______________________________________________
> Xenomai mailing list
> Xenomai@xenomai.org
> http://xenomai.org/mailman/listinfo/xenomai
>
in the file API.CHANGES:
2.5.5 -> 2.6.0
* rt_task_set_mode() does not support the T_PRIMARY bit
anymore; the latter has been replaced by T_CONFORMING, which
is allowed in the setmask only, and only effective for
real-time shadows.
In other words,
- rt_task_set_mode(clrmask, setmask=T_PRIMARY, &oldmode)
becomes:
rt_task_set_mode(clrmask, setmask=T_CONFORMING, &oldmode),
forcing primary mode only for SCHED_FIFO Xenomai threads
only. Nop otherwise (i.e. a non real-time shadow remains
in relaxed mode after the syscall has returned, since this
is its conforming runtime mode).
- rt_task_set_mode(clrmask=T_CONFORMING, setmask, &oldmode)
always begets -EINVAL.
Regards
Johann
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Xenomai] how to force task switch to primary mode
2015-11-25 17:20 [Xenomai] how to force task switch to primary mode JK.Behnke
2015-11-25 17:40 ` Johann Obermayr
@ 2015-11-28 11:31 ` Gilles Chanteperdrix
1 sibling, 0 replies; 3+ messages in thread
From: Gilles Chanteperdrix @ 2015-11-28 11:31 UTC (permalink / raw)
To: JK.Behnke; +Cc: xenomai
On Wed, Nov 25, 2015 at 06:20:34PM +0100, JK.Behnke@web.de wrote:
> Hello,
>
> an rtdm driver that I use requires the rt_dev_open call to be executed
> in primary mode.
> With xenomai 2.4.2 it was possible to switch to primary mode using
> rt_task_set_mode(0, T_PRIMARY, NULL);
>
> Now I use xenomai 2.6.3, but I can't find the T_PRIMARY flag.
> Is there an other alternative to force the task to switch to primary
> mode?
I have not reacted earlier. But if you are porting old code to a new
version of Xenomai, there is absolutely no reason to use Xenomai
2.6.3. You could want to stay in the 2.x branch, because for
instance you are using Xenomai skins other than RTDM in kernel
space, but then the version of choice is Xenomai 2.6.4, not 2.6.3.
2.6.4 is API and even ABI compatible with 2.6.3, only with some
known bugs fixed, and support for more recent versions of Linux (and
yes, before you ask, Xenomai 2.6.4 can be used with any version of
Linux for which an I-pipe patch was released before its release,
even 2.4 kernels are supposed to work).
You should also note that there may be another version of Xenomai
2.6, in order to release the current contents of its git tree, but
once this is done, there will be no plan for a next release. Xenomai
2.6 will be quasi-EOL. The current development branch is Xenomai 3,
so, starting now to use Xenomai 2.6 may not be the best idea.
--
Gilles.
https://click-hack.org
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-11-28 11:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-25 17:20 [Xenomai] how to force task switch to primary mode JK.Behnke
2015-11-25 17:40 ` Johann Obermayr
2015-11-28 11:31 ` Gilles Chanteperdrix
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.