Xenomai 2.4. and C++ (again)
Hi!
I am currently trying to run some C++ code as an Xenomai task. I wasn't aware that there are any problems with C++ until I found out today that some function calls in my C++ code break the real-time determinism of the task. Xenomai will not be able to interrupt the task although it should (as a higher-priority task should become active). The functions in question use the std::vector and std::string class.
After I became aware of that behavior I searched a little and found out that there is a C++ Wrapper class called Xeno-- and that the problems that occurred in my case seem to be well known.
Unfortunately I couldn't find any documentation what C++ calls are known to cause such a behavior.
As I can not use the Xeno-- Wrapper for several reasons. I wonder if some user on this list has some experience with C++ and could provide a list of functions / practices to avoid to make C++ code work as expected.
Some facts about the project:
- I use Xenomai 2.4.3
- Yes - I do call mlockall() before creating any task
- as far as I know no dynamic memory operations are done in the functions I use (I am not sure about every detail how std::vector / std::string work - but I don't explicitly generate new objects / delete them)
Thanks a lot
Stephan Adler
Quoted 8 lines · Stephan Adler
Hi!
I am currently trying to run some C++ code as an Xenomai task. I wasn't aware that there are any problems with C++ until I found out today that some function calls in my C++ code break the real-time determinism of the task. Xenomai will not be able to interrupt the task although it should (as a higher-priority task should become active).
Either your perception is wrong, or this is a bug. Could you provide a small example exhibiting such behaviour ?
Quoted 4 lines
- as far as I know no dynamic memory operations are done in the functions I use (I am not sure about every detail how
std::vector/std::stringwork - but I don't explicitly generate new objects / delete them)
std::vector and std::string use dynamic allocation without any doubt.
Signature · 1 line
Gilles.