missing compat version of rt_task_set_periodic

Tormod Volden lists.tormod at gmail.com
Fri Aug 30 17:00:08 CEST 2019


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__

Here is a small compile test program:

$ cat xeno_compat_test.c

#include <alchemy/task.h>
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’?
   rt_task_set_periodic(NULL, TM_NOW, 0);

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.

Best regards,

More information about the Xenomai mailing list