git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6314 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2013-09-23 13:03:56 +00:00
parent 3d30779fd7
commit ca516fd8e6
2 changed files with 6 additions and 13 deletions

View File

@ -359,11 +359,6 @@ typedef struct {
/* Module macros. */ /* Module macros. */
/*===========================================================================*/ /*===========================================================================*/
/**
* @brief String quotation macro.
*/
#define __CH_QUOTE(p) #p
/** /**
* @name Threads tables definition macros * @name Threads tables definition macros
* @{ * @{
@ -742,11 +737,11 @@ typedef struct {
#if !defined(chDbgAssert) #if !defined(chDbgAssert)
#define chDbgAssert(c, r) { \ #define chDbgAssert(c, r) { \
if (!(c)) \ if (!(c)) \
chSysHalt("A:"__CH_QUOTE(__FUNCTION__)":"__CH_QUOTE(__LINE__)); \ chSysHalt(__func__); \
} }
#endif /* !defined(chDbgAssert) */ #endif /* !defined(chDbgAssert) */
#else /* !NIL_CFG_ENABLE_ASSERTS */ #else /* !NIL_CFG_ENABLE_ASSERTS */
#define chDbgAssert(c, r) /*{(void)(c);}*/ #define chDbgAssert(c, r) {if (0) (void)(c);}
#endif /* !NIL_CFG_ENABLE_ASSERTS */ #endif /* !NIL_CFG_ENABLE_ASSERTS */
/** @} */ /** @} */

View File

@ -121,8 +121,6 @@ typedef struct {
/* Module macros. */ /* Module macros. */
/*===========================================================================*/ /*===========================================================================*/
#define __QUOTE_THIS(p) #p
#if CH_DBG_SYSTEM_STATE_CHECK #if CH_DBG_SYSTEM_STATE_CHECK
#define _dbg_enter_lock() (ch.dbg_lock_cnt = 1) #define _dbg_enter_lock() (ch.dbg_lock_cnt = 1)
#define _dbg_leave_lock() (ch.dbg_lock_cnt = 0) #define _dbg_leave_lock() (ch.dbg_lock_cnt = 0)
@ -170,12 +168,12 @@ typedef struct {
#if !defined(chDbgCheck) #if !defined(chDbgCheck)
#define chDbgCheck(c) { \ #define chDbgCheck(c) { \
if (!(c)) \ if (!(c)) \
chSysHalt("C:"__QUOTE_THIS(__FUNCTION__)":"__QUOTE_THIS(__LINE__)); \ chSysHalt(__func__); \
} }
#endif /* !defined(chDbgCheck) */ #endif /* !defined(chDbgCheck) */
#else /* !CH_DBG_ENABLE_CHECKS */ #else /* !CH_DBG_ENABLE_CHECKS */
#define chDbgCheck(c) /*{(void)(c);}*/ #define chDbgCheck(c) {if (0) (void)(c);}
#endif /* !CH_DBG_ENABLE_CHECKS */ #endif /* !CH_DBG_ENABLE_CHECKS */
#if CH_DBG_ENABLE_ASSERTS || defined(__DOXYGEN__) #if CH_DBG_ENABLE_ASSERTS || defined(__DOXYGEN__)
@ -196,11 +194,11 @@ typedef struct {
#if !defined(chDbgAssert) #if !defined(chDbgAssert)
#define chDbgAssert(c, r) { \ #define chDbgAssert(c, r) { \
if (!(c)) \ if (!(c)) \
chSysHalt("A:"__QUOTE_THIS(__FUNCTION__)":"__QUOTE_THIS(__LINE__)); \ chSysHalt(__func__); \
} }
#endif /* !defined(chDbgAssert) */ #endif /* !defined(chDbgAssert) */
#else /* !CH_DBG_ENABLE_ASSERTS */ #else /* !CH_DBG_ENABLE_ASSERTS */
#define chDbgAssert(c, r) /*{(void)(c);}*/ #define chDbgAssert(c, r) {if (0) (void)(c);}
#endif /* !CH_DBG_ENABLE_ASSERTS */ #endif /* !CH_DBG_ENABLE_ASSERTS */
/** @} */ /** @} */