native kernel task example
Hi,
I'm looking for a very simple kernel task using native api. A very simple one would be nice, a periodical task for example.
I'm interested in the .c file and its Makefile.
Thank you in advance.
Ramon
Quoted 6 lines · Ramon
Hi,
I'm looking for a very simple kernel task using native api. A very simple one would be nice, a periodical task for example.
I'm interested in the .c file and its
Makefile.
You can find examples in the "examples" directory of the Xenomai tree as documented here:
http://xenomai.org/index.php/Examples
http://www.rts.uni-hannover.de/xenomai/lxr/source/examples/native/trivial-periodic.c
might be what you are looking for.
Wolfgang.
Quoted 11 lines · Wolfgang Grandegger
Quoted 6 lines · Ramon
Hi,
I'm looking for a very simple kernel task using native api. A very simple one would be nice, a periodical task for example.
I'm interested in the .c file and its
Makefile.You can find examples in the "examples" directory of the Xenomai tree as documented here:
Quoted 7 lines
http://xenomai.org/index.php/Examples
http://www.rts.uni-hannover.de/xenomai/lxr/source/examples/native/trivial-periodic.c
might be what you are looking for.
Wolfgang.
Just be warned that the in-kernel skin usage is considered deprecated (with exception of RTDM). It may not be the best choice when starting something new.
Jan
Hi,
I have a system developed (teaching and research purposes) developed in RTLinuxfree and currently I'm trying to migrate this system to Xenomai (several task periodical task with period of 100us (one at 50us)).
As a first step I would like to run them at kernel level to preserve performance (hard realtime), latter I will try to migrate user space.
This task contains low level commands (out, in commands to access AD/DA card registers)
Any suggestion ?
Best wishes
Ramon
Quoted 29 lines · Jan Kiszka
Quoted 12 lines · Wolfgang Grandegger
Quoted 7 lines · Ramon
Hi,
I'm looking for a very simple kernel task using native api. A very simple one would be nice, a periodical task for example.
I'm interested in the .c file and its
Makefile.You can find examples in the "examples" directory of the Xenomai tree as documented here:
Quoted 8 lines
http://xenomai.org/index.php/Examples
http://www.rts.uni-hannover.de/xenomai/lxr/source/examples/native/trivial-periodic.c
might be what you are looking for.
Wolfgang.
Just be warned that the in-kernel skin usage is considered deprecated (with exception of RTDM). It may not be the best choice when starting something new.
Jan
Quoted 8 lines · Ramon
Hi,
I have a system developed (teaching and research purposes) developed in RTLinuxfree and currently I'm trying to migrate
this system to Xenomai (several task periodical task with period of 100us (one at 50us)).
As a first step I would like to run them at kernel level to preserve performance (hard realtime),
Unless your system is already running on its limits with this 20 KHz job, kernel vs. user space won't make the big difference. Check the results of the latency test while loading the system with I/O and memory cache stress to get a first impression.
Quoted 2 lines
latter I will try to migrate
user space.
Specifically while trying to stabilize the port, you will quickly love the robustness of user space: if something crashes or hangs, just attach gdb - but don't forget to enable the Xenomai watchdog in order to catch runaway tasks.
Quoted 3 lines
This task contains low level commands (out, in commands to access AD/DA card registers)
iopl(3) will grant your root user space process in/out privileges. Not nice, but probably easier as a first step than porting over the Analogy framework.
Jan
PS: Specifically for educational purposes, it is a bad idea to continue spreading the legacy concept of kernel-based RT applications.