summaryrefslogtreecommitdiff
path: root/include/rtthread.h
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2023-07-26 22:53:51 -0400
committerMeco Man <[email protected]>2023-07-26 23:14:54 -0400
commitc1cc1332e98fd8ba55a4fef9fbcacf45f4081b36 (patch)
treeb324ebb81f7e465013a69af9cfea810c1ad4ba3d /include/rtthread.h
parent9cffb706ba37a0d10fecd6137d7423f6f2efc05f (diff)
[debug] fix the error when disable RT_USING_DEBUG
Diffstat (limited to 'include/rtthread.h')
-rw-r--r--include/rtthread.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/rtthread.h b/include/rtthread.h
index a72b00a3e7..4c23e43e2a 100644
--- a/include/rtthread.h
+++ b/include/rtthread.h
@@ -717,6 +717,9 @@ if (!(EX)) \
{ \
rt_assert_handler(#EX, __FUNCTION__, __LINE__); \
}
+#else
+#define RT_ASSERT(EX)
+#endif /* RT_USING_DEBUG */
#ifdef RT_DEBUGING_CONTEXT
/* Macro to check current context */
@@ -791,9 +794,6 @@ while (0)
#define RT_DEBUG_IN_THREAD_CONTEXT
#define RT_DEBUG_SCHEDULER_AVAILABLE(need_check)
#endif /* RT_DEBUGING_CONTEXT */
-#else
-#define RT_ASSERT(EX)
-#endif /* RT_USING_DEBUG */
/**@}*/