!321 chore: fix typos

Merge pull request !321 from kenneth/destroy
This commit is contained in:
openharmony_ci 2021-06-17 14:06:06 +08:00 committed by Gitee
commit 37d80146db
10 changed files with 11 additions and 11 deletions

View File

@ -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:

View File

@ -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;

View File

@ -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

View File

@ -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);

View File

@ -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;
}

View File

@ -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:

View File

@ -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;

View File

@ -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;

View File

@ -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);
}

View File

@ -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)) {