add l0 testsuits
Change-Id: I523269c97053f484d5cb0d94397269e41eaae86c
This commit is contained in:
2
testsuits/src/Makefile
Normal file
2
testsuits/src/Makefile
Normal file
@@ -0,0 +1,2 @@
|
||||
objs-y += osTest.o
|
||||
objs-y += iCunit.o
|
||||
160
testsuits/src/iCunit.c
Normal file
160
testsuits/src/iCunit.c
Normal file
@@ -0,0 +1,160 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
|
||||
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors may be used
|
||||
* to endorse or promote products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "iCunit.h"
|
||||
#include "iCunit.inc"
|
||||
#include "string.h"
|
||||
#include "osTest.h"
|
||||
#include "iCunit_config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
|
||||
extern UINT32 g_failResult;
|
||||
extern UINT32 g_passResult;
|
||||
void ICunitSaveErr(iiUINT32 line, iiUINT32 retCode)
|
||||
{
|
||||
iCunit_errLineNo = (iCunit_errLineNo == 0) ? line : iCunit_errLineNo;
|
||||
iCunit_errCode = (iCunit_errCode == 0) ? (iiUINT32)retCode : iCunit_errCode;
|
||||
}
|
||||
|
||||
iUINT32 ICunitAddCase(iCHAR *caseName, CASE_FUNCTION caseFunc, iUINT16 testcaseLayer, iUINT16 testcaseModule,
|
||||
iUINT16 testcaseLevel, iUINT16 testcaseType)
|
||||
{
|
||||
iUINT16 idx;
|
||||
|
||||
if (iCunit_Init_Success) {
|
||||
return (iUINT32)ICUNIT_UNINIT;
|
||||
}
|
||||
|
||||
idx = 0;
|
||||
if (idx == ICUNIT_CASE_SIZE) {
|
||||
iCunit_ErrLog_AddCase++;
|
||||
return (iUINT32)ICUNIT_CASE_FULL;
|
||||
}
|
||||
|
||||
iCunit_CaseArray[idx].pcCaseID = caseName;
|
||||
iCunit_CaseArray[idx].pstCaseFunc = caseFunc;
|
||||
iCunit_CaseArray[idx].testcase_layer = testcaseLayer;
|
||||
iCunit_CaseArray[idx].testcase_module = testcaseModule;
|
||||
iCunit_CaseArray[idx].testcase_level = testcaseLevel;
|
||||
iCunit_CaseArray[idx].testcase_type = testcaseType;
|
||||
|
||||
ICunitRun();
|
||||
return (iUINT32)ICUNIT_SUCCESS;
|
||||
}
|
||||
|
||||
iUINT32 ICunitInit()
|
||||
{
|
||||
iCunit_Init_Success = 0x0000;
|
||||
iCunit_Case_Cnt = 0x0000;
|
||||
|
||||
iCunit_Case_FailedCnt = 0;
|
||||
|
||||
iCunit_ErrLog_AddCase = 0;
|
||||
|
||||
(void)memset_s(iCunit_CaseArray, sizeof(iCunit_CaseArray), 0, sizeof(iCunit_CaseArray));
|
||||
return (iUINT32)ICUNIT_SUCCESS;
|
||||
}
|
||||
|
||||
char *g_strLayer[] = {
|
||||
"LOS", "CMSIS", "POSIX", "LIB", "VFS", "EXTEND",
|
||||
"PARTITION", "CPP", "SHELL", "LINUX", "USB", "DRIVERFRAME", "CONTEXTHUB"
|
||||
};
|
||||
char *g_strModule[] = {
|
||||
"TASK", "MEM", "SEM", "MUX", "EVENT", "QUE", "SWTMR", "HWI", "ATO", "CPUP", "SCATTER", "RUNSTOP", "TIMER", "MMU", "TICKLESS",
|
||||
"ROBIN", "LIBC", "WAIT", "VFAT", "YAFFS", "JFFS", "RAMFS", "NFS", "PROC", "FS",
|
||||
"PTHREAD", "COMP", "HWI_HALFBOTTOM", "WORKQ", "WAKELOCK", "TIMES",
|
||||
"LIBM", "SUPPORT", "STL", "MAIL", "MSG", "CP", "SIGNAL", "SCHED", "MTDCHAR", "TIME", "WRITE", "READ", "DYNLOAD", "REGISTER", "SR", "UNAME", "ERR"
|
||||
};
|
||||
char *g_strLevel[] = {
|
||||
"LEVEL0", "LEVEL1", "LEVEL2", "LEVEL3"
|
||||
};
|
||||
char *g_strType[] = {
|
||||
"FUNCTITON", "PRESSURE", "PERFORMANCE"
|
||||
};
|
||||
|
||||
iUINT32 ICunitRunF()
|
||||
{
|
||||
iUINT32 idx, idx1;
|
||||
ICUNIT_CASE_S *psubCaseArray;
|
||||
iUINT32 caseRet;
|
||||
|
||||
psubCaseArray = iCunit_CaseArray;
|
||||
idx1 = 1;
|
||||
|
||||
for (idx = 0; idx < idx1; idx++, psubCaseArray++) {
|
||||
iCunit_errLineNo = 0;
|
||||
iCunit_errCode = 0;
|
||||
|
||||
caseRet = psubCaseArray->pstCaseFunc();
|
||||
psubCaseArray->errLine = iCunit_errLineNo;
|
||||
psubCaseArray->retCode = (0 == iCunit_errLineNo) ? (caseRet) : (iCunit_errCode);
|
||||
|
||||
if (0 == iCunit_errLineNo && 0 == caseRet) {
|
||||
g_passResult++;
|
||||
PRINTF(" [Passed]-%s-%s-%s-%s-%s\n", psubCaseArray->pcCaseID, g_strLayer[psubCaseArray->testcase_layer],
|
||||
g_strModule[psubCaseArray->testcase_module], g_strLevel[psubCaseArray->testcase_level],
|
||||
g_strType[psubCaseArray->testcase_type]);
|
||||
} else {
|
||||
g_failResult++;
|
||||
iCunit_Case_FailedCnt++;
|
||||
PRINTF(" [Failed]-%s-%s-%s-%s-%s-[Errline: %d RetCode:0x%x]\n", psubCaseArray->pcCaseID,
|
||||
g_strLayer[psubCaseArray->testcase_layer], g_strModule[psubCaseArray->testcase_module],
|
||||
g_strLevel[psubCaseArray->testcase_level], g_strType[psubCaseArray->testcase_type],
|
||||
psubCaseArray->errLine, psubCaseArray->retCode);
|
||||
}
|
||||
}
|
||||
|
||||
return (iUINT32)ICUNIT_SUCCESS;
|
||||
}
|
||||
|
||||
iUINT32 ICunitRun()
|
||||
{
|
||||
if (iCunit_Init_Success) {
|
||||
return (iUINT32)ICUNIT_UNINIT;
|
||||
}
|
||||
|
||||
ICunitRunF();
|
||||
|
||||
return (iUINT32)ICUNIT_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
322
testsuits/src/osTest.c
Normal file
322
testsuits/src/osTest.c
Normal file
@@ -0,0 +1,322 @@
|
||||
/*
|
||||
* Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved.
|
||||
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its contributors may be used
|
||||
* to endorse or promote products derived from this software without specific prior written
|
||||
* permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "osTest.h"
|
||||
#include "los_config.h"
|
||||
#include "los_swtmr.h"
|
||||
#if (LITEOS_CMSIS_TEST == 1)
|
||||
#include "cmsis_os.h"
|
||||
#endif
|
||||
|
||||
UINT32 volatile g_testCount;
|
||||
UINT32 g_testTskHandle;
|
||||
UINT32 g_testTaskID01;
|
||||
UINT32 g_testTaskID02;
|
||||
UINT32 g_testTaskID03;
|
||||
UINT32 g_testTaskID04;
|
||||
|
||||
EVENT_CB_S g_eventCB01;
|
||||
EVENT_CB_S g_eventCB02;
|
||||
EVENT_CB_S g_eventCB03;
|
||||
UINT32 g_mutexTest;
|
||||
EVENT_CB_S g_exampleEvent;
|
||||
|
||||
UINT32 g_hwiNum1;
|
||||
UINT32 g_hwiNum2;
|
||||
UINT32 g_usSemID;
|
||||
UINT32 g_usSemID2;
|
||||
UINT32 g_cpupTestCount;
|
||||
UINT32 g_cmsisRobinCount1;
|
||||
UINT32 g_cmsisCount;
|
||||
|
||||
UINT16 g_usSwTmrID;
|
||||
|
||||
UINT32 g_testQueueID01;
|
||||
UINT32 g_testQueueID02;
|
||||
UINT32 g_testQueueID03;
|
||||
|
||||
UINT16 g_index;
|
||||
UINT32 g_loopCycle = 0xFFFFF;
|
||||
|
||||
UINT32 g_passResult = 0;
|
||||
UINT32 g_failResult = 0;
|
||||
UINT32 g_testTskHandle;
|
||||
|
||||
UINT32 g_leavingTaskNum;
|
||||
UINT32 g_testTaskIdArray[LOSCFG_BASE_CORE_TSK_LIMIT] = {0};
|
||||
UINT32 g_uwGetTickConsume = 0;
|
||||
|
||||
UINT32 g_usSemID3[LOSCFG_BASE_IPC_SEM_CONFIG + 1];
|
||||
|
||||
#define TST_RAMADDRSTART 0x20000000
|
||||
#define TST_RAMADDREND 0x20010000
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
|
||||
|
||||
#if (CMSIS_OS_VER == 2)
|
||||
extern SWTMR_CTRL_S *g_swtmrCBArray;
|
||||
UINT32 SwtmrCountGetTest(VOID)
|
||||
{
|
||||
UINT32 loop;
|
||||
UINT32 swTmrCnt = 0;
|
||||
UINTPTR intSave;
|
||||
SWTMR_CTRL_S *swTmrCB = (SWTMR_CTRL_S *)NULL;
|
||||
|
||||
intSave = LOS_IntLock();
|
||||
swTmrCB = g_swtmrCBArray;
|
||||
for (loop = 0; loop < LOSCFG_BASE_CORE_SWTMR_LIMIT; loop++, swTmrCB++) {
|
||||
if (swTmrCB->ucState != OS_SWTMR_STATUS_UNUSED) {
|
||||
swTmrCnt++;
|
||||
}
|
||||
}
|
||||
(VOID)LOS_IntRestore(intSave);
|
||||
return swTmrCnt;
|
||||
}
|
||||
#endif
|
||||
|
||||
void TestKernel(void)
|
||||
{
|
||||
#if (LOS_KERNEL_CORE_TASK_TEST == 1)
|
||||
ItSuiteLosTask();
|
||||
#endif
|
||||
#if (LOS_KERNEL_IPC_QUEUE_TEST == 1)
|
||||
ItSuiteLosQueue();
|
||||
#endif
|
||||
#if (LOS_KERNEL_IPC_MUX_TEST == 1)
|
||||
ItSuiteLosMux();
|
||||
#endif
|
||||
#if (LOS_KERNEL_IPC_EVENT_TEST == 1)
|
||||
ItSuiteLosEvent();
|
||||
#endif
|
||||
#if (LOS_KERNEL_IPC_SEM_TEST == 1)
|
||||
ItSuiteLosSem();
|
||||
#endif
|
||||
#if (LOS_KERNEL_CORE_SWTMR_TEST == 1)
|
||||
ItSuiteLosSwtmr();
|
||||
#endif
|
||||
#if (LOS_KERNEL_HWI_TEST == 1)
|
||||
ItSuiteLosHwi();
|
||||
#endif
|
||||
#if (LOS_KERNEL_MEM_TEST == 1)
|
||||
ItSuiteLosMem();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#if (CMSIS_OS_VER == 2)
|
||||
void TestCmsis2(void)
|
||||
{
|
||||
#if (LOS_CMSIS2_CORE_TASK_TEST == 1)
|
||||
ItSuite_Cmsis_Los_Task();
|
||||
#endif
|
||||
|
||||
#if (LOS_CMSIS2_IPC_EVENT_TEST == 1)
|
||||
ItSuite_Cmsis_Los_Event();
|
||||
#endif
|
||||
#if (LOS_CMSIS2_CORE_SWTMR_TEST == 1)
|
||||
ItSuite_Cmsis_Los_Swtmr();
|
||||
#endif
|
||||
#if (LOS_CMSIS2_IPC_SEM_TEST == 1)
|
||||
ItSuite_Cmsis_Los_Sem();
|
||||
#endif
|
||||
#if (LOS_CMSIS2_IPC_MUX_TEST == 1)
|
||||
ItSuite_Cmsis_Los_Mux();
|
||||
#endif
|
||||
#if (LOS_CMSIS2_HWI_TEST == 1)
|
||||
ItSuite_Cmsis_Los_Hwi();
|
||||
#endif
|
||||
#if (LOS_CMSIS2_IPC_MSG_TEST == 1)
|
||||
ItSuite_Cmsis_Los_Msg();
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
VOID TestTaskEntry()
|
||||
{
|
||||
PRINTF("\t\n --- Test Start --- \n\n");
|
||||
ICunitInit();
|
||||
|
||||
TestKernel();
|
||||
|
||||
#if (CMSIS_OS_VER == 1)
|
||||
PRINTF("\n --- cmsis 1 unsupport--- \n\n");
|
||||
#elif (CMSIS_OS_VER == 2)
|
||||
TestCmsis2();
|
||||
#endif
|
||||
|
||||
PRINTF("\t\n --- Test End --- \n");
|
||||
PRINTF("\nfailed count : %d, success count:%d\n", g_failResult, g_passResult);
|
||||
}
|
||||
|
||||
UINT32 los_TestInit(VOID)
|
||||
{
|
||||
UINT32 ret;
|
||||
TSK_INIT_PARAM_S osTaskInitParam;
|
||||
|
||||
osTaskInitParam.pfnTaskEntry = (TSK_ENTRY_FUNC)TestTaskEntry;
|
||||
osTaskInitParam.uwStackSize = OS_TSK_TEST_STACK_SIZE;
|
||||
osTaskInitParam.pcName = "IT_TST_INI";
|
||||
osTaskInitParam.usTaskPrio = TASK_PRIO_TEST;
|
||||
osTaskInitParam.uwResved = LOS_TASK_STATUS_DETACHED;
|
||||
|
||||
ret = LOS_TaskCreate(&g_testTskHandle, &osTaskInitParam);
|
||||
if (LOS_OK != ret) {
|
||||
PRINTF("LosTestInit error\n");
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
UINT32 LosAppInit()
|
||||
{
|
||||
UINT32 ret;
|
||||
|
||||
ret = los_TestInit();
|
||||
if (ret != LOS_OK) {
|
||||
return ret;
|
||||
}
|
||||
return LOS_OK;
|
||||
}
|
||||
|
||||
#ifdef LOS_HIMIDEER_RV32
|
||||
#ifdef LOS_HIMIDEERV100
|
||||
#define HWI_TRIG_BASE 0x20c20
|
||||
#define HWI_CLEAN_TRI 0x20c20
|
||||
#define HIW_SYS_COUNT OS_RISCV_SYS_VECTOR_CNT
|
||||
#elif defined(LOS_HIFONEV320_RV32)
|
||||
#define HWI_TRIG_BASE 0xF8B31000
|
||||
#define HWI_CLEAN_TRI (HWI_TRIG_BASE + 0x04)
|
||||
#define HWI_MASK_IRQ (HWI_TRIG_BASE + 0x0c)
|
||||
#define HIW_SYS_COUNT (26 + 6)
|
||||
#endif
|
||||
|
||||
VOID TestHwiTrigger(UINT32 hwiNum)
|
||||
{
|
||||
LOS_InterruptUnmask(hwiNum);
|
||||
volatile UINT32 val;
|
||||
#ifdef LOS_HIMIDEERV100
|
||||
val = *(volatile UINT32 *)HWI_TRIG_BASE;
|
||||
val |= (1 << (hwiNum - OS_RISCV_SYS_VECTOR_CNT));
|
||||
#elif defined(LOS_HIFONEV320_RV32)
|
||||
val = hwiNum - HIW_SYS_COUNT;
|
||||
#endif
|
||||
*(volatile UINT32 *)HWI_TRIG_BASE = val;
|
||||
mb();
|
||||
}
|
||||
|
||||
UINT32 TestHwiDelete(UINT32 hwiNum)
|
||||
{
|
||||
volatile UINT32 val;
|
||||
#ifdef LOS_HIMIDEERV100
|
||||
val = *(volatile UINT32 *)0x20c20;
|
||||
val &= ~(1 << (hwiNum - OS_RISCV_SYS_VECTOR_CNT));
|
||||
#elif defined(LOS_HIFONEV320_RV32)
|
||||
val = hwiNum - HIW_SYS_COUNT;
|
||||
#endif
|
||||
*(volatile UINT32 *)HWI_CLEAN_TRI = val;
|
||||
LOS_HwiDelete(hwiNum, NULL);
|
||||
return LOS_OK;
|
||||
}
|
||||
|
||||
VOID TestHwiClear(UINT32 hwiNum)
|
||||
{
|
||||
volatile UINT32 val;
|
||||
#ifdef LOS_HIMIDEERV100
|
||||
val = *(volatile UINT32 *)HWI_CLEAN_TRI;
|
||||
val &= ~(1 << (hwiNum - OS_RISCV_SYS_VECTOR_CNT));
|
||||
#elif defined(LOS_HIFONEV320_RV32)
|
||||
val = hwiNum - HIW_SYS_COUNT;
|
||||
#endif
|
||||
*(volatile UINT32 *)HWI_CLEAN_TRI = val;
|
||||
mb();
|
||||
}
|
||||
|
||||
#define HIGH_SHIFT 32
|
||||
UINT64 LosCpuCycleGet(VOID)
|
||||
{
|
||||
UINT32 timeHi, timeLo;
|
||||
UINT64 timeCycle;
|
||||
|
||||
LOS_GetCpuCycle(&timeHi, &timeLo);
|
||||
timeCycle = ((UINT64)timeHi << HIGH_SHIFT) + timeLo;
|
||||
return timeCycle;
|
||||
}
|
||||
#else
|
||||
|
||||
#define OS_NVIC_SETPEND 0xE000E200
|
||||
#define OS_NVIC_CLRPEND 0xE000E280
|
||||
#define HWI_SHIFT_NUM 5
|
||||
#define HWI_BIT 2
|
||||
VOID TestHwiTrigger(UINT32 hwiNum)
|
||||
{
|
||||
*(volatile UINT32 *)(OS_NVIC_SETPEND + ((hwiNum >> HWI_SHIFT_NUM) << HWI_BIT)) = 1 << (hwiNum & 0x1F);
|
||||
}
|
||||
VOID TestHwiUnTrigger(UINT32 hwiNum)
|
||||
{
|
||||
*(volatile UINT32 *)(OS_NVIC_CLRPEND + ((hwiNum >> HWI_SHIFT_NUM) << HWI_BIT)) = 1 << (hwiNum & 0x1F);
|
||||
}
|
||||
#define OS_NVIC_CLRENA_BASE 0xE000E180
|
||||
#define NVIC_CLR_IRQ(uwHwiNum) \
|
||||
do { \
|
||||
*(volatile UINT32 *)(OS_NVIC_CLRENA_BASE + (((uwHwiNum) >> HWI_SHIFT_NUM) << HWI_BIT)) = 1 << ((uwHwiNum) & 0x1F); \
|
||||
} while (0)
|
||||
|
||||
UINT32 TestHwiDelete(UINT32 hwiNum)
|
||||
{
|
||||
UINT32 ret = HalHwiDelete(hwiNum);
|
||||
if (ret != LOS_OK) {
|
||||
return LOS_NOK;
|
||||
}
|
||||
return LOS_OK;
|
||||
}
|
||||
VOID TestHwiClear(UINT32 hwiNum) {}
|
||||
#endif
|
||||
|
||||
#if (LOSCFG_BASE_IPC_SEM == YES)
|
||||
UINT32 TestSemDelete(UINT32 semHandle)
|
||||
{
|
||||
return LOS_SemDelete(semHandle);
|
||||
}
|
||||
UINT32 g_usSemID;
|
||||
UINT32 g_usSemID2;
|
||||
UINT32 g_usSemID3[LOSCFG_BASE_IPC_SEM_LIMIT + 1];
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif /* __cpluscplus */
|
||||
#endif /* __cpluscplus */
|
||||
Reference in New Issue
Block a user