提交 37d80146 编写于 作者: O openharmony_ci 提交者: Gitee

!321 chore: fix typos

Merge pull request !321 from kenneth/destroy
......@@ -91,7 +91,7 @@ int map_errno(UINT32 err)
errno = ENOMEM;
break;
case LOS_ERRNO_SEM_PENDED:
case LOS_ERRNO_EVENT_SHOULD_NOT_DESTORY:
case LOS_ERRNO_EVENT_SHOULD_NOT_DESTROY:
errno = EBUSY;
break;
case LOS_ERRNO_SEM_PEND_IN_LOCK:
......
......@@ -286,7 +286,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 LOS_EventDestroy(PEVENT_CB_S eventCB)
SCHEDULER_LOCK(intSave);
if (!LOS_ListEmpty(&eventCB->stEventList)) {
SCHEDULER_UNLOCK(intSave);
return LOS_ERRNO_EVENT_SHOULD_NOT_DESTORY;
return LOS_ERRNO_EVENT_SHOULD_NOT_DESTROY;
}
eventCB->uwEventID = 0;
......
......@@ -149,13 +149,13 @@ extern "C" {
/**
* @ingroup los_event
* Event reading error code: should not be distory.
* Event reading error code: should not be destroy.
*
* Value: 0x02001c08
*
* Solution: Check whether the event list is not empty.
*/
#define LOS_ERRNO_EVENT_SHOULD_NOT_DESTORY LOS_ERRNO_OS_ERROR(LOS_MOD_EVENT, 0x08)
#define LOS_ERRNO_EVENT_SHOULD_NOT_DESTROY LOS_ERRNO_OS_ERROR(LOS_MOD_EVENT, 0x08)
/**
* @ingroup los_event
......
......@@ -70,7 +70,7 @@ static UINT32 Testcase(VOID)
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
ret = LOS_EventDestroy(&g_event);
ICUNIT_ASSERT_EQUAL(ret, LOS_ERRNO_EVENT_SHOULD_NOT_DESTORY, ret);
ICUNIT_ASSERT_EQUAL(ret, LOS_ERRNO_EVENT_SHOULD_NOT_DESTROY, ret);
ICUNIT_GOTO_EQUAL(g_testCount, 1, g_testCount, EXIT);
......
......@@ -57,7 +57,7 @@ static VOID TaskF02(VOID)
{
UINT32 ret;
ret = LOS_EventDestroy(&g_event);
ICUNIT_ASSERT_EQUAL_VOID(ret, LOS_ERRNO_EVENT_SHOULD_NOT_DESTORY, ret);
ICUNIT_ASSERT_EQUAL_VOID(ret, LOS_ERRNO_EVENT_SHOULD_NOT_DESTROY, ret);
TestDumpCpuid();
return;
}
......
......@@ -81,7 +81,7 @@ static UINT32 Testcase(VOID)
ICUNIT_GOTO_NOT_EQUAL((ret & OS_TASK_STATUS_PEND), 0, ret, EXIT);
ret = LOS_EventDestroy(&g_event);
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_EVENT_SHOULD_NOT_DESTORY, ret, EXIT);
ICUNIT_GOTO_EQUAL(ret, LOS_ERRNO_EVENT_SHOULD_NOT_DESTROY, ret, EXIT);
ICUNIT_GOTO_EQUAL(g_testCount, 1, g_testCount, EXIT);
EXIT:
......
......@@ -57,7 +57,7 @@ static VOID TaskF02(VOID)
{
UINT32 ret;
ret = LOS_EventDestroy(&g_event);
ICUNIT_ASSERT_EQUAL_VOID(ret, LOS_ERRNO_EVENT_SHOULD_NOT_DESTORY, ret);
ICUNIT_ASSERT_EQUAL_VOID(ret, LOS_ERRNO_EVENT_SHOULD_NOT_DESTROY, ret);
LOS_AtomicInc(&g_testCount);
TestDumpCpuid();
return;
......
......@@ -57,7 +57,7 @@ static VOID HwiF01(VOID)
{
UINT32 ret;
ret = LOS_EventDestroy(&g_event);
ICUNIT_ASSERT_EQUAL_VOID(ret, LOS_ERRNO_EVENT_SHOULD_NOT_DESTORY, ret);
ICUNIT_ASSERT_EQUAL_VOID(ret, LOS_ERRNO_EVENT_SHOULD_NOT_DESTROY, ret);
TestDumpCpuid();
LOS_AtomicInc(&g_testCount);
return;
......
......@@ -107,7 +107,7 @@ static UINT32 Testcase(VOID)
ICUNIT_GOTO_EQUAL(g_testCount, 4, g_testCount, EXIT); // 4, Here, assert that g_testCount is equal to 4.
if ((g_ret != LOS_OK) && (g_ret != LOS_ERRNO_EVENT_SHOULD_NOT_DESTORY)) {
if ((g_ret != LOS_OK) && (g_ret != LOS_ERRNO_EVENT_SHOULD_NOT_DESTROY)) {
ICUNIT_GOTO_EQUAL(1, 0, g_ret, EXIT);
}
......
......@@ -105,7 +105,7 @@ static UINT32 Testcase(void)
if ((g_ret1 == 0x11) && (g_ret2 == LOS_OK) && (g_ret3 == LOS_OK)) { // pend-post-del ///post-pend-del
} else if ((g_ret1 == 0x11) && (g_ret2 == LOS_OK) && (g_ret3 == LOS_OK)) { // del-pend-post//del-post-pend
} else if ((g_ret1 == 0x11) && (g_ret2 == LOS_OK) &&
(g_ret3 == LOS_ERRNO_EVENT_SHOULD_NOT_DESTORY)) { // pend-delete-post
(g_ret3 == LOS_ERRNO_EVENT_SHOULD_NOT_DESTROY)) { // pend-delete-post
} else if ((g_ret1 == 0xff) && (g_ret2 == LOS_OK) && (g_ret3 == LOS_OK)) { // post-del-pend
LOS_TaskDelete(g_szId[0]); // delete the pend task
} else if ((g_ret1 == 0x00) && (g_ret2 == LOS_OK) && (g_ret3 == LOS_OK)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册