Commit 5c9cbcfc authored by Philippe Gerum's avatar Philippe Gerum Committed by Jan Kiszka

cobalt/assert: pipeline: add TODO() marker

As its name suggests, TODO() can be added to the code in order to
highlight a place where some implementation bits are known to be
missing. Turning on CONFIG_XENO_TODO reveals the places where such
markers might linger by triggering a build time assertion, so that
they don't go unnoticed.

We may drop this helper when the port to Dovetail is complete.
Signed-off-by: Philippe Gerum's avatarPhilippe Gerum <rpm@xenomai.org>
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 758b3163
......@@ -58,6 +58,8 @@
do { } while (0)
#endif
#define TODO() BUILD_BUG_ON(IS_ENABLED(CONFIG_XENO_TODO))
#define primary_mode_only() XENO_BUG_ON(CONTEXT, is_secondary_domain())
#define secondary_mode_only() XENO_BUG_ON(CONTEXT, !is_secondary_domain())
#define interrupt_only() XENO_BUG_ON(CONTEXT, !xnsched_interrupt_p())
......
......@@ -485,3 +485,9 @@ config XENO_OPT_WATCHDOG_TIMEOUT
Watchdog timeout value (in seconds).
endif # XENO_OPT_DEBUG
config XENO_TODO
bool "Reveal TODO places"
help
This option causes a build time assertion to trigger
when the TODO() marker is found in the compiled code.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment