Jan Kiszka wrote:



Here is an attempt to base the activation of XENO_ASSERT on a subsystem
debug switch at compile time, applied on RTDM.

The procedure of adding a new system for XENO_ASSERT usage would be to
define the required kbuild switch according to the naming scheme
CONFIG_XENO_OPT_DEBUG_subsystem, include nucleus/assert.h, and add
"#define CONFIG_XENO_OPT_DEBUG_subsystem 0" for the unset case.
XENO_ASSERT is new called with (subsystem, condition, action). If we
invent further debugging macros, they could be controlled in a similar way.

What do you think?


I like the flexibity this approach brings (even if I think that the context checking in drvlib.c should be done unconditionally, regardless of the debug mode -- but that's probably a matter of personal taste). I've merged this patch, so that we can further use this debug infrastructure in other sub-systems. Thanks.

--

Philippe.

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to