I'm working on a project aimed to control a bipad robot supposed to play soccer game. All programs are written in plain C++ linked against various shared libraries (for example OpenCV, Servo-motor controllers, etc.)
The system is performance critical and should be 95% hard real-time, so the Xenomai patch has been applied to kernel. Unfortunately benchmarks on thread-switch latency, shows the system does not satisfy hard real-time needs in all situations. Duo to this work. we can improve performance by porting all stuff into kernel space.
I never developed kernel modules... Just read some documentations. Seems to be different with regular user-space programs. Even build system is different.
My question: Is this possible to turn a regular user-space application written entirely in C++, widely using shared libraries, and POSIX threads into a kernel module?
If the answer is no, I'm gonna re-compile all libraries statically and use C instead... That will be harmful and time consuming process.
libc
itself) make things even more complex. Perhaps it could be easier to move only the most performance-critical parts of the application to a separate kernel module, most likely written from scratch, and make the application use that module. It could take some time though. May be the experts out there have better ideas on what to do here. – Eugene