Skip to contentSkip to conversation

Feedback on https://v3.xenomai.org/tips/porting-posix/

DISCUSSION Haiyang He 2 participants 2 messages May 21, 2025

lore
Share & tools
lore

Haiyang He

author
#0 lore raw

Dear Xenomai Project Team,

I recently visited tips/porting-posix page and was reading through the content.

Some content on the webpage may not be consistent with the Xenomai source codes.

1. "For more information try wrap-link.sh –help."

wrap-link.sh does not support "-help" arg,and report:

wrap-link.sh: 212: -help: not found

2. "Xenomai compilation flags define a preprocessor macro (__XENO__) which allows you to know whether or not you are compiling the application for Xenomai."

The output of "xeno-config --cflags --skin=posix" does not contain macro (__XENO__).

$ DESTDIR=`pwd` usr/xenomai/bin/xeno-config --cflags --skin=posix
-I/root/xenomai/xenomai-v3.2.4-install/usr/xenomai/include/cobalt -I/root/xenomai/xenomai-v3.2.4-install/usr/xenomai/include -march=armv8-a -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__COBALT__ -D__COBALT_WRAP__

3. "To get your application threads to be really considered as real-time threads by Xenomai scheduler, you will have to get them to use the real-time scheduling policy (called SCHED_FIFO). "

I check the cobalt_sched_policy_param() function, sched_class is xnsched_class_rt for both SCHED_FIFO and SCHED_RR.

BR,
Haiyang He.

#1 lore raw
Quoted 5 lines · Haiyang He

Dear Xenomai Project Team,

I recently visited tips/porting-posix page and was reading through the content.

Quoted 8 lines

Some content on the webpage may not be consistent with the Xenomai source codes.

1. "For more information try wrap-link.sh –help."

wrap-link.sh does not support "-help" arg,and report:

wrap-link.sh: 212: -help: not found

Ouch - but that should be simple to add, given that we already have this when you don't specify any arguments.

Quoted 7 lines

2. "Xenomai compilation flags define a preprocessor macro (__XENO__) which allows you to know whether or not you are compiling the application for Xenomai."

The output of "xeno-config --cflags --skin=posix" does not contain macro (__XENO__).

$ DESTDIR=`pwd` usr/xenomai/bin/xeno-config --cflags --skin=posix
-I/root/xenomai/xenomai-v3.2.4-install/usr/xenomai/include/cobalt -I/root/xenomai/xenomai-v3.2.4-install/usr/xenomai/include -march=armv8-a -D_GNU_SOURCE -D_REENTRANT -fasynchronous-unwind-tables -D__COBALT__ -D__COBALT_WRAP__

bd0a6612d3d47aae3d53a52857b138d557735807 -> we should update that description accordingly. After 15 years.

Quoted 4 lines

3. "To get your application threads to be really considered as real-time threads by Xenomai scheduler, you will have to get them to use the real-time scheduling policy (called SCHED_FIFO). "

I check the cobalt_sched_policy_param() function, sched_class is xnsched_class_rt for both SCHED_FIFO and SCHED_RR.

Right, there are even more: SCHED_TP, SCHED_QUOTA, SCHED_SPORADIC, SCHED_WEAK. It seems those classes are only documented in Kconfig right now...

Happy to take patches, for the low-hanging fruits (first two), but only for that latter one where we first need to find a good spot to drop the information.

And many thanks again for finding and reporting these inconsistencies!

Jan

Signature · 2 lines
Siemens AG, Foundational Technologies
Linux Expert Center