提交 03bcd070 编写于 作者: G guozhanxin 提交者: guo

[ci] fix build error.

上级 b32eae36
...@@ -1043,7 +1043,7 @@ int timer_create(clockid_t clockid, struct sigevent *evp, timer_t *timerid) ...@@ -1043,7 +1043,7 @@ int timer_create(clockid_t clockid, struct sigevent *evp, timer_t *timerid)
return -1; /* todo:memory leak */ return -1; /* todo:memory leak */
} }
_g_timerid[_timerid] = timer; _g_timerid[_timerid] = timer;
*timerid = (timer_t *)(rt_ubase_t)_timerid; *timerid = (timer_t)(rt_ubase_t)_timerid;
timer_id_unlock(); timer_id_unlock();
return 0; return 0;
......
...@@ -637,59 +637,59 @@ void test_thread_yield_nosmp(void) ...@@ -637,59 +637,59 @@ void test_thread_yield_nosmp(void)
uassert_true(thread_yield_flag == 1); uassert_true(thread_yield_flag == 1);
} }
static rt_uint32_t thread9_count = 0; // static rt_uint32_t thread9_count = 0;
static void thread9_entry(void *parameter) // static void thread9_entry(void *parameter)
{ // {
while (1) // while (1)
{ // {
thread9_count ++; // thread9_count ++;
} // }
} // }
static void test_thread_suspend(void) // static void test_thread_suspend(void)
{ // {
static rt_thread_t tid; // static rt_thread_t tid;
rt_err_t ret_startup = -RT_ERROR; // rt_err_t ret_startup = -RT_ERROR;
uint32_t count_before_suspend, count_before_resume, count_after_resume; // uint32_t count_before_suspend, count_before_resume, count_after_resume;
tid = rt_thread_create("thread9", // tid = rt_thread_create("thread9",
thread9_entry, // thread9_entry,
RT_NULL, // RT_NULL,
THREAD_STACK_SIZE, // THREAD_STACK_SIZE,
__current_thread->current_priority + 1, // __current_thread->current_priority + 1,
THREAD_TIMESLICE); // THREAD_TIMESLICE);
if (tid == RT_NULL) // if (tid == RT_NULL)
{ // {
LOG_E("rt_thread_create failed!"); // LOG_E("rt_thread_create failed!");
uassert_false(tid4 == RT_NULL); // uassert_false(tid4 == RT_NULL);
goto __exit; // goto __exit;
} // }
ret_startup = rt_thread_startup(tid); // ret_startup = rt_thread_startup(tid);
if (ret_startup != RT_EOK) // if (ret_startup != RT_EOK)
{ // {
LOG_E("rt_thread_startup failed!"); // LOG_E("rt_thread_startup failed!");
uassert_false(1); // uassert_false(1);
goto __exit; // goto __exit;
} // }
rt_thread_delay(5); // rt_thread_delay(5);
rt_thread_suspend(tid); // rt_thread_suspend(tid);
count_before_suspend = thread9_count; // count_before_suspend = thread9_count;
uassert_true(count_before_suspend != 0); // uassert_true(count_before_suspend != 0);
rt_thread_delay(5); // rt_thread_delay(5);
count_before_resume = thread9_count; // count_before_resume = thread9_count;
uassert_true(count_before_suspend == count_before_resume); // uassert_true(count_before_suspend == count_before_resume);
rt_thread_resume(tid); // rt_thread_resume(tid);
rt_thread_delay(5); // rt_thread_delay(5);
count_after_resume = thread9_count; // count_after_resume = thread9_count;
uassert_true(count_after_resume != count_before_resume); // uassert_true(count_after_resume != count_before_resume);
__exit: // __exit:
if (tid != RT_NULL) // if (tid != RT_NULL)
{ // {
rt_thread_delete(tid); // rt_thread_delete(tid);
} // }
return; // return;
} // }
#endif #endif
static rt_err_t utest_tc_init(void) static rt_err_t utest_tc_init(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册