提交 0c2af37b 编写于 作者: M mculover666

fix a bug in the kernel obj verify function

上级 ef489bf5
......@@ -23,9 +23,7 @@ __CDECLS_BEGIN
#if TOS_CFG_BARRIER_EN > 0
typedef struct k_barrier_st {
#if TOS_CFG_OBJECT_VERIFY_EN > 0u
knl_obj_t knl_obj;
#endif
pend_obj_t pend_obj;
k_barrier_cnt_t count;
......
......@@ -21,9 +21,7 @@
typedef uint32_t k_bmtbl_t;
typedef struct k_bitmap_st {
#if TOS_CFG_OBJECT_VERIFY_EN > 0u
knl_obj_t knl_obj;
#endif
uint32_t bit_ndx_max;
uint32_t bit_max;
......
......@@ -25,9 +25,7 @@ __CDECLS_BEGIN
typedef uint16_t completion_done_t;
typedef struct k_completion_st {
#if TOS_CFG_OBJECT_VERIFY_EN > 0u
knl_obj_t knl_obj;
#endif
pend_obj_t pend_obj;
completion_done_t done;
......
......@@ -22,9 +22,7 @@ __CDECLS_BEGIN
#if TOS_CFG_COUNTDOWNLATCH_EN > 0
typedef struct k_countdownlatch_st {
#if TOS_CFG_OBJECT_VERIFY_EN > 0u
knl_obj_t knl_obj;
#endif
pend_obj_t pend_obj;
k_countdownlatch_cnt_t count;
......
......@@ -43,9 +43,7 @@ typedef enum opt_event_post_en {
} opt_event_post_t;
typedef struct k_event_st {
#if TOS_CFG_OBJECT_VERIFY_EN > 0u
knl_obj_t knl_obj;
#endif
pend_obj_t pend_obj;
k_event_flag_t flag;
......@@ -83,7 +81,7 @@ __API__ k_err_t tos_event_destroy(k_event_t *event);
* pend an event.
*
* @attention if opt is TOS_OPT_EVENT_PEND_ANY, any of the flag_expect is set is ok;
* if opt is TOS_OPT_EVENT_PEND_ALL£¬ must all the flag_expect is set is ok.
* if opt is TOS_OPT_EVENT_PEND_ALL�� must all the flag_expect is set is ok.
*
* @param[in] event pointer to the handler of the event.
* @param[in] flag_expect the flag we expect from the event.
......
......@@ -24,9 +24,7 @@ __CDECLS_BEGIN
#define K_MMBLK_ALIGN_MASK (sizeof(void *) - 1u)
typedef struct k_mmblk_pool_st {
#if TOS_CFG_OBJECT_VERIFY_EN > 0u
knl_obj_t knl_obj;
#endif
void *pool_start;
void *free_list;
......
......@@ -23,9 +23,7 @@ __CDECLS_BEGIN
#if TOS_CFG_MUTEX_EN > 0u
typedef struct k_mutex_st {
#if TOS_CFG_OBJECT_VERIFY_EN > 0u
knl_obj_t knl_obj;
#endif
pend_obj_t pend_obj;
k_nesting_t pend_nesting;
......
......@@ -25,9 +25,7 @@ __CDECLS_BEGIN
typedef uint16_t rw_cnt_t;
typedef struct k_rwlock_st {
#if TOS_CFG_OBJECT_VERIFY_EN > 0u
knl_obj_t knl_obj;
#endif
k_mutex_t lock;
k_sem_t signal;
......
......@@ -23,9 +23,7 @@ __CDECLS_BEGIN
#if TOS_CFG_SEM_EN > 0u
typedef struct k_sem_st {
#if TOS_CFG_OBJECT_VERIFY_EN > 0u
knl_obj_t knl_obj;
#endif
pend_obj_t pend_obj;
k_sem_cnt_t count;
......
......@@ -21,9 +21,7 @@
__CDECLS_BEGIN
typedef struct k_stopwatch_st {
#if TOS_CFG_OBJECT_VERIFY_EN > 0u
knl_obj_t knl_obj;
#endif
k_tick_t until;
} k_stopwatch_t;
......
......@@ -109,8 +109,10 @@ TEST test_tos_timer_stop(void)
err = tos_timer_stop(K_NULL);
ASSERT_EQ(err, K_ERR_OBJ_PTR_NULL);
#if TOS_CFG_OBJECT_VERIFY_EN > 0u
err = tos_timer_stop(&test_timer_00);
ASSERT_EQ(err, K_ERR_OBJ_INVALID);
#endif
err = tos_timer_create(&test_timer_00, (k_tick_t)500u, (k_tick_t)0u,
test_timer_call_back_dummy, K_NULL,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册