mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
Remove up_assert_code
This commit is contained in:
+3
-12
@@ -61,9 +61,6 @@
|
||||
# define ASSERT(f) \
|
||||
{ if (!(f)) up_assert((const uint8_t *)__FILE__, (int)__LINE__); }
|
||||
|
||||
# define ASSERTCODE(f, code) \
|
||||
{ if (!(f)) up_assert_code((const uint8_t *)__FILE__, (int)__LINE__, code); }
|
||||
|
||||
# define VERIFY(f) \
|
||||
{ if ((f) < 0) up_assert((const uint8_t *)__FILE__, (int)__LINE__); }
|
||||
|
||||
@@ -77,16 +74,13 @@
|
||||
# define DEBUGVERIFY(f) ((void)(f))
|
||||
# endif /* CONFIG_DEBUG */
|
||||
|
||||
# define PANIC(code) \
|
||||
up_assert_code((const uint8_t *)__FILE__, (int)__LINE__, (code)|0x8000)
|
||||
# define PANIC() \
|
||||
up_assert((const uint8_t *)__FILE__, (int)__LINE__)
|
||||
|
||||
#else
|
||||
# define ASSERT(f) \
|
||||
{ if (!(f)) up_assert(); }
|
||||
|
||||
# define ASSERTCODE(f, code) \
|
||||
{ if (!(f)) up_assert_code(code); }
|
||||
|
||||
# define VERIFY(f) \
|
||||
{ if ((f) < 0) up_assert(); }
|
||||
|
||||
@@ -101,7 +95,7 @@
|
||||
# endif /* CONFIG_DEBUG */
|
||||
|
||||
# define PANIC(code) \
|
||||
up_assert_code((code)|0x8000)
|
||||
up_assert()
|
||||
|
||||
#endif
|
||||
|
||||
@@ -131,11 +125,8 @@ extern "C"
|
||||
|
||||
#ifdef CONFIG_HAVE_FILENAME
|
||||
void up_assert(FAR const uint8_t *filename, int linenum) noreturn_function;
|
||||
void up_assert_code(FAR const uint8_t *filename, int linenum, int errcode)
|
||||
noreturn_function;
|
||||
#else
|
||||
void up_assert(void) noreturn_function;
|
||||
void up_assert_code(int errcode) noreturn_function;
|
||||
#endif
|
||||
|
||||
#undef EXTERN
|
||||
|
||||
@@ -400,11 +400,10 @@ void up_reprioritize_rtr(FAR struct tcb_s *tcb, uint8_t priority);
|
||||
/* Prototype is in unistd.h */
|
||||
|
||||
/****************************************************************************
|
||||
* Name: up_assert and up_assert_code
|
||||
* Name: up_assert
|
||||
*
|
||||
* Description:
|
||||
* Assertions may be handled in an architecture-specific
|
||||
* way.
|
||||
* Assertions may be handled in an architecture-specific way.
|
||||
*
|
||||
****************************************************************************/
|
||||
/* Prototype is in assert.h */
|
||||
|
||||
@@ -94,8 +94,7 @@
|
||||
#define SYS_task_delete (CONFIG_SYS_RESERVED+22)
|
||||
#define SYS_task_restart (CONFIG_SYS_RESERVED+23)
|
||||
#define SYS_up_assert (CONFIG_SYS_RESERVED+24)
|
||||
#define SYS_up_assert_code (CONFIG_SYS_RESERVED+25)
|
||||
#define __SYS_vfork (CONFIG_SYS_RESERVED+26)
|
||||
#define __SYS_vfork (CONFIG_SYS_RESERVED+25)
|
||||
|
||||
/* The following can be individually enabled */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user