missing compat version of rt_task_set_periodic

Jan Kiszka jan.kiszka at siemens.com
Fri Aug 30 17:10:29 CEST 2019


On 30.08.19 17:00, Tormod Volden via Xenomai wrote:
> Hi,
> 
> I am porting an old RTNet / RTAI (3.8.1) application to latest xenomai
> (currently using git master). For this I chose the alchemy skin, and
> to make it as close as possible to the old API, I am also trying to
> enable the --compat transition kit. However, rt_task_set_periodic()
> disappears as soon as I add --compat. I am not sure whether it is an
> include file / macro bug or if I am not using it correctly, so I hope
> you can give me a hint.
> 
> xenomai was built from git master, with --configure --with-core=cobalt
> and installed.
> 
> $ xeno-config --skin=alchemy --compat --cflags
> 
> -I/usr/xenomai/include/trank -D__XENO_COMPAT__
> -I/usr/xenomai/include/cobalt -I/usr/xenomai/include -D_GNU_SOURCE
> -D_REENTRANT -fasynchronous-unwind-tables -D__COBALT__
> -I/usr/xenomai/include/alchemy
> 
> Here is a small compile test program:
> 
> $ cat xeno_compat_test.c
> 
> #include <alchemy/task.h>

In compat mode, the prototype comes via native/task.h again.

Jan

> void test(void)
> {
>    rt_task_set_periodic(NULL, TM_NOW, 0);
> }
> 
> Using only --alchemy works fine:
> 
> $ gcc -c xeno_compat_test.c $(xeno-config --skin=alchemy --cflags)
> $
> 
> However, with --compat it fails:
> 
> $ gcc -c xeno_compat_test.c $(xeno-config --skin=alchemy --compat --cflags)
> xeno_compat_test.c: In function ‘test’:
> xeno_compat_test.c:6:3: warning: implicit declaration of function
> ‘rt_task_set_periodic’; did you mean ‘rt_task_set_priority’?
> [-Wimplicit-function-declaration]
>     rt_task_set_periodic(NULL, TM_NOW, 0);
>     ^~~~~~~~~~~~~~~~~~~~
>     rt_task_set_priority
> 
> Using --skin=native gives the same result as --compat. I found out
> that I can use __current_rt_task_set_periodic() to force the use of
> the "new" function, but I could't get something like
> __compat_rt_task_set_periodic() to work.
> 

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux



More information about the Xenomai mailing list