aboutsummaryrefslogtreecommitdiffstats
path: root/os/kernel/include/chdebug.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-08-10 14:50:32 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-08-10 14:50:32 +0000
commiteb7a1a15b23341693864c6fc13ac5eab5c1d6122 (patch)
treec34ea755269ab2f4d740065de79993647ec94e90 /os/kernel/include/chdebug.h
parent10a6a01271053053c64077fee56d0cb8444123b6 (diff)
downloadChibiOS-eb7a1a15b23341693864c6fc13ac5eab5c1d6122.tar.gz
ChibiOS-eb7a1a15b23341693864c6fc13ac5eab5c1d6122.tar.bz2
ChibiOS-eb7a1a15b23341693864c6fc13ac5eab5c1d6122.zip
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
Diffstat (limited to 'os/kernel/include/chdebug.h')
-rw-r--r--os/kernel/include/chdebug.h22
1 files changed, 8 insertions, 14 deletions
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:<br>
- * @<function_name@>(), #@<assert_number@>
* @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 */
/** @} */