Replies: 1 comment 5 replies
-
|
Hi @jhnlmn To me, dlt-daemon has reach it time, and hard to say a huge refactor works here. Fortunately, at Bosch we are developing and working on the same philosophy: a safe realtime dlt. I cannot tell further, and cannot promise anything now, but when the prototype done, it shall be made open source upstream, so that code can be reviewed under more eyes. Thanks and hope to see any collab from you in the future |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Embedded, real time, safe and automotive SW is not allowed to call malloc, mutex and other non-deterministic APIs at run time.
I tried to call DLT_LOG in a loop and see that it calls calloc() and free() for every DLT_LOG call.
I see language in dlt_for_developers.md under "Send log message with given buffer" that dynamic allocation can be avoided
by using dlt_user_log_write_start_w_given_buffer.
But I find very little documentation about how to use dlt_user_log_write_start_w_given_buffer and other DLT APIs safely.
I see that dlt_user_log_write_start_w_given_buffer calls dlt_user_log_init which may call dlt_init, which calls dlt_init_common,
which calls many unsafe functions like malloc, getenv, mutex creation and others.
So, in its current form it cannot be used in safe SW.
I wonder whether it may be possible to perform some minimal refactoring of DLT,
may be place some code (such as dlt_init) under #ifndef DLT_SAFE (like some vendors are doing these days)
and then document clearly which functions can be called at run time and which only during initialization (again this is a common practice now).
Thank you
Beta Was this translation helpful? Give feedback.
All reactions