diff --git a/compat/posix/src/map_error.c b/compat/posix/src/map_error.c index 791fc787..c25d1133 100644 --- a/compat/posix/src/map_error.c +++ b/compat/posix/src/map_error.c @@ -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: diff --git a/kernel/base/ipc/los_event.c b/kernel/base/ipc/los_event.c index 028e35c9..fd872d64 100644 --- a/kernel/base/ipc/los_event.c +++ b/kernel/base/ipc/los_event.c @@ -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; diff --git a/kernel/include/los_event.h b/kernel/include/los_event.h index 8a426eaa..36411416 100644 --- a/kernel/include/los_event.h +++ b/kernel/include/los_event.h @@ -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 diff --git a/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_004.c b/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_004.c index d13a1a14..7e520457 100644 --- a/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_004.c +++ b/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_004.c @@ -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); diff --git a/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_005.c b/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_005.c index 78bb4b1d..821b6f7f 100644 --- a/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_005.c +++ b/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_005.c @@ -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; } diff --git a/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_006.c b/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_006.c index 15f0e966..60570852 100644 --- a/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_006.c +++ b/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_006.c @@ -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: diff --git a/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_007.c b/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_007.c index 4ebc57e5..868b544b 100644 --- a/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_007.c +++ b/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_007.c @@ -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; diff --git a/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_009.c b/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_009.c index be44e69a..e35855e2 100644 --- a/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_009.c +++ b/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_009.c @@ -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; diff --git a/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_031.c b/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_031.c index 4998ccea..0cf5b4ab 100644 --- a/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_031.c +++ b/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_031.c @@ -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); } diff --git a/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_032.c b/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_032.c index 5f6feb30..ef39eb66 100644 --- a/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_032.c +++ b/testsuites/kernel/sample/kernel_base/ipc/event/smp/It_smp_los_event_032.c @@ -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)) {