All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Xenomai 2.4. and C++ (again)
@ 2008-09-03  9:06 Stephan Adler
  2008-09-03  9:28 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 2+ messages in thread
From: Stephan Adler @ 2008-09-03  9:06 UTC (permalink / raw)
  To: xenomai

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





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Xenomai-help] Xenomai 2.4. and C++ (again)
  2008-09-03  9:06 [Xenomai-help] Xenomai 2.4. and C++ (again) Stephan Adler
@ 2008-09-03  9:28 ` Gilles Chanteperdrix
  0 siblings, 0 replies; 2+ messages in thread
From: Gilles Chanteperdrix @ 2008-09-03  9:28 UTC (permalink / raw)
  To: Stephan Adler; +Cc: xenomai

Stephan Adler wrote:
> 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 ?

> - 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)

std::vector and std::string use dynamic allocation without any doubt.

-- 
                                                 Gilles.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-03  9:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-03  9:06 [Xenomai-help] Xenomai 2.4. and C++ (again) Stephan Adler
2008-09-03  9:28 ` Gilles Chanteperdrix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.