From eb7a1a15b23341693864c6fc13ac5eab5c1d6122 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 10 Aug 2013 14:50:32 +0000 Subject: Removed 2nd parameter to assertion and check macros. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6122 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/kernel/include/chdebug.h | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'os/kernel/include/chdebug.h') diff --git a/os/kernel/include/chdebug.h b/os/kernel/include/chdebug.h index 0f4083c84..836645f07 100644 --- a/os/kernel/include/chdebug.h +++ b/os/kernel/include/chdebug.h @@ -177,49 +177,43 @@ typedef struct { * is specified in @p chconf.h else the macro does nothing. * * @param[in] c the condition to be verified to be true - * @param[in] func the undecorated function name * * @api */ #if !defined(chDbgCheck) -#define chDbgCheck(c, func) { \ +#define chDbgCheck(c) { \ if (!(c)) \ - chDbgPanic(__QUOTE_THIS(func)"()"); \ + chDbgPanic("C:"__QUOTE_THIS(__FUNCTION__)":"__QUOTE_THIS(__LINE__)); \ } #endif /* !defined(chDbgCheck) */ #else /* !CH_DBG_ENABLE_CHECKS */ -#define chDbgCheck(c, func) { \ - (void)(c), (void)__QUOTE_THIS(func)"()"; \ -} +#define chDbgCheck(c) {(void)(c);} #endif /* !CH_DBG_ENABLE_CHECKS */ #if CH_DBG_ENABLE_ASSERTS || defined(__DOXYGEN__) /** * @brief Condition assertion. - * @details If the condition check fails then the kernel panics with the - * specified message and halts. + * @details If the condition check fails then the kernel panics with a + * message and halts. * @note The condition is tested only if the @p CH_DBG_ENABLE_ASSERTS switch * is specified in @p chconf.h else the macro does nothing. - * @note The convention for the message is the following:
- * @(), #@ * @note The remark string is not currently used except for putting a * comment in the code about the assertion. * * @param[in] c the condition to be verified to be true - * @param[in] m the text message * @param[in] r a remark string * * @api */ #if !defined(chDbgAssert) -#define chDbgAssert(c, m, r) { \ +#define chDbgAssert(c, r) { \ if (!(c)) \ - chDbgPanic(m); \ + chDbgPanic("A:"__QUOTE_THIS(__FUNCTION__)":"__QUOTE_THIS(__LINE__)); \ } #endif /* !defined(chDbgAssert) */ #else /* !CH_DBG_ENABLE_ASSERTS */ -#define chDbgAssert(c, m, r) {(void)(c);} +#define chDbgAssert(c, r) {(void)(c);} #endif /* !CH_DBG_ENABLE_ASSERTS */ /** @} */ -- cgit v1.2.3