diff --git a/arch/arm/arm/include/los_hw_cpu.h b/arch/arm/arm/include/los_hw_cpu.h
index f6fc4460..425ca449 100644
--- a/arch/arm/arm/include/los_hw_cpu.h
+++ b/arch/arm/arm/include/los_hw_cpu.h
@@ -145,7 +145,7 @@ STATIC INLINE VOID ArchCurrUserTaskSet(UINTPTR val)
STATIC INLINE UINT32 ArchCurrCpuid(VOID)
{
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
return ARM_SYSREG_READ(MPIDR) & MPIDR_CPUID_MASK;
#else
return 0;
diff --git a/arch/arm/arm/src/los_arch_mmu.c b/arch/arm/arm/src/los_arch_mmu.c
index 435dcfaf..cce73fe2 100644
--- a/arch/arm/arm/src/los_arch_mmu.c
+++ b/arch/arm/arm/src/los_arch_mmu.c
@@ -51,7 +51,7 @@
__attribute__((aligned(MMU_DESCRIPTOR_L1_SMALL_ENTRY_NUMBERS))) \
__attribute__((section(".bss.prebss.translation_table"))) UINT8 \
g_firstPageTable[MMU_DESCRIPTOR_L1_SMALL_ENTRY_NUMBERS];
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
__attribute__((aligned(MMU_DESCRIPTOR_L1_SMALL_ENTRY_NUMBERS))) \
__attribute__((section(".bss.prebss.translation_table"))) UINT8 \
g_tempPageTable[MMU_DESCRIPTOR_L1_SMALL_ENTRY_NUMBERS];
@@ -218,7 +218,7 @@ STATIC UINT32 OsCvtSecCacheFlagsToMMUFlags(UINT32 flags)
switch (flags & VM_MAP_REGION_FLAG_CACHE_MASK) {
case VM_MAP_REGION_FLAG_CACHED:
mmuFlags |= MMU_DESCRIPTOR_L1_TYPE_NORMAL_WRITE_BACK_ALLOCATE;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
mmuFlags |= MMU_DESCRIPTOR_L1_SECTION_SHAREABLE;
#endif
break;
@@ -544,7 +544,7 @@ STATIC UINT32 OsCvtPte2CacheFlagsToMMUFlags(UINT32 flags)
switch (flags & VM_MAP_REGION_FLAG_CACHE_MASK) {
case VM_MAP_REGION_FLAG_CACHED:
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
mmuFlags |= MMU_DESCRIPTOR_L2_SHAREABLE;
#endif
mmuFlags |= MMU_DESCRIPTOR_L2_TYPE_NORMAL_WRITE_BACK_ALLOCATE;
diff --git a/arch/arm/arm/src/los_exc.c b/arch/arm/arm/src/los_exc.c
index 1c0c89cd..d944caaf 100644
--- a/arch/arm/arm/src/los_exc.c
+++ b/arch/arm/arm/src/los_exc.c
@@ -75,7 +75,7 @@ VOID OsExcHook(UINT32 excType, ExcContext *excBufAddr, UINT32 far, UINT32 fsr);
UINT32 g_curNestCount[LOSCFG_KERNEL_CORE_NUM] = { 0 };
BOOL g_excFromUserMode[LOSCFG_KERNEL_CORE_NUM];
STATIC EXC_PROC_FUNC g_excHook = (EXC_PROC_FUNC)OsExcHook;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
STATIC SPIN_LOCK_INIT(g_excSerializerSpin);
STATIC UINT32 g_currHandleExcPID = OS_INVALID_VALUE;
STATIC UINT32 g_nextExcWaitCpu = INVALID_CPUID;
@@ -531,7 +531,7 @@ STATIC VOID OsExcRestore(VOID)
g_excFromUserMode[currCpuID] = FALSE;
g_intCount[currCpuID] = 0;
g_curNestCount[currCpuID] = 0;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
OsPercpuGet()->excFlag = CPU_RUNNING;
#endif
OsPercpuGet()->taskLockCnt = 0;
@@ -548,7 +548,7 @@ STATIC VOID OsUserExcHandle(ExcContext *excBufAddr)
return;
}
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
LOS_SpinLock(&g_excSerializerSpin);
if (g_nextExcWaitCpu != INVALID_CPUID) {
g_currHandleExcCpuID = g_nextExcWaitCpu;
@@ -563,7 +563,7 @@ STATIC VOID OsUserExcHandle(ExcContext *excBufAddr)
#endif
runProcess->processStatus &= ~OS_PROCESS_FLAG_EXIT;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
#ifdef LOSCFG_FS_VFS
OsWakeConsoleSendTask();
#endif
@@ -909,7 +909,7 @@ VOID OsDataAbortExcHandleEntry(ExcContext *excBufAddr)
#endif /* __LINUX_ARM_ARCH__ */
#endif /* LOSCFG_GDB */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
#define EXC_WAIT_INTER 50U
#define EXC_WAIT_TIME 2000U
@@ -1027,7 +1027,7 @@ STATIC VOID OsCheckAllCpuStatus(VOID)
STATIC VOID OsCheckCpuStatus(VOID)
{
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
OsCheckAllCpuStatus();
#else
g_currHandleExcCpuID = ArchCurrCpuid();
@@ -1048,7 +1048,7 @@ LITE_OS_SEC_TEXT VOID STATIC OsExcPriorDisposal(ExcContext *excBufAddr)
OsCheckCpuStatus();
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
#ifdef LOSCFG_FS_VFS
/* Wait for the end of the Console task to avoid multicore printing code */
OsWaitConsoleSendTaskPend(OsCurrTaskGet()->taskID);
@@ -1113,7 +1113,7 @@ LITE_OS_SEC_TEXT_INIT VOID OsExcHandleEntry(UINT32 excType, ExcContext *excBufAd
OsPrintExcHead(far);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
OsAllCpuStatusOutput();
#endif
diff --git a/arch/arm/gic/gic_v2.c b/arch/arm/gic/gic_v2.c
index 75c23219..9479c0d4 100644
--- a/arch/arm/gic/gic_v2.c
+++ b/arch/arm/gic/gic_v2.c
@@ -40,7 +40,7 @@ STATIC_ASSERT(OS_USER_HWI_MAX <= 1020, "hwi max is too large!");
STATIC UINT32 g_curIrqNum = 0;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
/*
* filter description
* 0b00: forward to the cpu interfaces specified in cpu_mask
@@ -144,7 +144,7 @@ VOID HalIrqInit(VOID)
/* enable gic distributor control */
GIC_REG_32(GICD_CTLR) = 1;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
/* register inter-processor interrupt */
(VOID)LOS_HwiCreate(LOS_MP_IPI_WAKEUP, 0xa0, 0, OsMpWakeHandler, 0);
(VOID)LOS_HwiCreate(LOS_MP_IPI_SCHEDULE, 0xa0, 0, OsMpScheduleHandler, 0);
diff --git a/arch/arm/gic/gic_v3.c b/arch/arm/gic/gic_v3.c
index 03b8cfd8..f6e943f9 100644
--- a/arch/arm/gic/gic_v3.c
+++ b/arch/arm/gic/gic_v3.c
@@ -48,7 +48,7 @@ STATIC INLINE UINT64 MpidrToAffinity(UINT64 mpidr)
(MPIDR_AFF_LEVEL(mpidr, 0)));
}
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
STATIC UINT32 NextCpu(UINT32 cpu, UINT32 cpuMask)
{
@@ -399,7 +399,7 @@ VOID HalIrqInit(VOID)
HalIrqInitPercpu();
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
/* register inter-processor interrupt */
LOS_HwiCreate(LOS_MP_IPI_WAKEUP, 0xa0, 0, OsMpWakeHandler, 0);
LOS_HwiCreate(LOS_MP_IPI_SCHEDULE, 0xa0, 0, OsMpScheduleHandler, 0);
diff --git a/arch/arm/include/hal_hwi.h b/arch/arm/include/hal_hwi.h
index 9d08589a..4b068e41 100644
--- a/arch/arm/include/hal_hwi.h
+++ b/arch/arm/include/hal_hwi.h
@@ -49,7 +49,7 @@ extern VOID HalIrqClear(UINT32 vector);
extern CHAR *HalIrqVersion(VOID);
extern UINT32 HalCurIrqGet(VOID);
extern UINT32 HalIrqSetPrio(UINT32 vector, UINT8 priority);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
extern VOID HalIrqSendIpi(UINT32 target, UINT32 ipi);
extern VOID HalIrqSetAffinity(UINT32 vector, UINT32 cpuMask);
#endif
diff --git a/compat/posix/src/pthread.c b/compat/posix/src/pthread.c
index b985da4f..f8ee1bf6 100644
--- a/compat/posix/src/pthread.c
+++ b/compat/posix/src/pthread.c
@@ -204,7 +204,7 @@ STATIC UINT32 InitPthreadData(pthread_t threadID, pthread_attr_t *userAttr,
PRINT_ERR("%s: %d, err: %d\n", __FUNCTION__, __LINE__, err);
return LOS_NOK;
}
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
if (userAttr->cpuset.__bits[0] > 0) {
taskCB->cpuAffiMask = (UINT16)userAttr->cpuset.__bits[0];
}
diff --git a/compat/posix/src/pthread_attr.c b/compat/posix/src/pthread_attr.c
index 29627cd3..0368b7bb 100644
--- a/compat/posix/src/pthread_attr.c
+++ b/compat/posix/src/pthread_attr.c
@@ -49,7 +49,7 @@ int pthread_attr_init(pthread_attr_t *attr)
attr->stacksize_set = 1;
attr->stacksize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
attr->cpuset.__bits[0] = 0;
#endif
@@ -239,7 +239,7 @@ int pthread_attr_getstacksize(const pthread_attr_t *attr, size_t *stackSize)
*/
int pthread_attr_setaffinity_np(pthread_attr_t* attr, size_t cpusetsize, const cpu_set_t* cpuset)
{
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
if (attr == NULL) {
return EINVAL;
}
@@ -264,7 +264,7 @@ int pthread_attr_setaffinity_np(pthread_attr_t* attr, size_t cpusetsize, const c
*/
int pthread_attr_getaffinity_np(const pthread_attr_t* attr, size_t cpusetsize, cpu_set_t* cpuset)
{
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
if ((attr == NULL) || (cpuset == NULL) || (cpusetsize != sizeof(cpu_set_t))) {
return EINVAL;
}
diff --git a/compat/posix/src/sched.c b/compat/posix/src/sched.c
index 1c80780b..ece7752f 100644
--- a/compat/posix/src/sched.c
+++ b/compat/posix/src/sched.c
@@ -61,7 +61,7 @@ int sched_get_priority_max(int policy)
*/
int sched_setaffinity(pid_t pid, size_t set_size, const cpu_set_t* set)
{
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
UINT32 taskID = (UINT32)pid;
UINT32 ret;
@@ -93,7 +93,7 @@ int sched_setaffinity(pid_t pid, size_t set_size, const cpu_set_t* set)
*/
int sched_getaffinity(pid_t pid, size_t set_size, cpu_set_t* set)
{
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
UINT32 taskID = (UINT32)pid;
UINT16 cpuAffiMask;
diff --git a/fs/jffs2/src/vfs_jffs2.c b/fs/jffs2/src/vfs_jffs2.c
index a0d3736c..5fa6a156 100644
--- a/fs/jffs2/src/vfs_jffs2.c
+++ b/fs/jffs2/src/vfs_jffs2.c
@@ -323,7 +323,7 @@ ssize_t VfsJffs2Write(struct file *filep, const char *buffer, size_t bufLen)
c = JFFS2_SB_INFO(node->i_sb);
pos = filep->f_pos;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
struct super_block *sb = node->i_sb;
UINT16 gcCpuMask = LOS_TaskCpuAffiGet(sb->s_gc_thread);
UINT32 curTaskId = LOS_CurTaskIDGet();
diff --git a/kernel/base/core/los_process.c b/kernel/base/core/los_process.c
index 0f7c4b35..8d00696b 100644
--- a/kernel/base/core/los_process.c
+++ b/kernel/base/core/los_process.c
@@ -183,7 +183,7 @@ VOID OsWaitWakeTask(LosTaskCB *taskCB, UINT32 wakePID)
{
taskCB->waitID = wakePID;
OsSchedTaskWake(taskCB);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
LOS_MpSchedule(OS_MP_CPU_ALL);
#endif
}
@@ -312,7 +312,7 @@ LITE_OS_SEC_TEXT VOID OsProcessResourcesToFree(LosProcessCB *processCB)
}
#endif
-#if (LOSCFG_KERNEL_LITEIPC == YES)
+#ifdef LOSCFG_KERNEL_LITEIPC
if (OsProcessIsUserMode(processCB)) {
LiteIpcPoolDelete(&(processCB->ipcInfo));
(VOID)memset_s(&(processCB->ipcInfo), sizeof(ProcIpcInfo), 0, sizeof(ProcIpcInfo));
@@ -685,7 +685,7 @@ STATIC UINT32 OsProcessCreateInit(LosProcessCB *processCB, UINT32 flags, const C
goto EXIT;
}
-#if (LOSCFG_KERNEL_LITEIPC == YES)
+#ifdef LOSCFG_KERNEL_LITEIPC
if (OsProcessIsUserMode(processCB)) {
ret = LiteIpcPoolInit(&(processCB->ipcInfo));
if (ret != LOS_OK) {
@@ -1294,7 +1294,7 @@ LITE_OS_SEC_TEXT UINT32 OsExecRecycleAndInit(LosProcessCB *processCB, const CHAR
return ret;
}
-#if (LOSCFG_KERNEL_LITEIPC == YES)
+#ifdef LOSCFG_KERNEL_LITEIPC
ret = LiteIpcPoolInit(&(processCB->ipcInfo));
if (ret != LOS_OK) {
return LOS_NOK;
@@ -1690,7 +1690,7 @@ STATIC UINT32 OsCopyProcessResources(UINT32 flags, LosProcessCB *child, LosProce
return ret;
}
-#if (LOSCFG_KERNEL_LITEIPC == YES)
+#ifdef LOSCFG_KERNEL_LITEIPC
if (OsProcessIsUserMode(child)) {
ret = LiteIpcPoolReInit(&child->ipcInfo, (const ProcIpcInfo *)(&run->ipcInfo));
if (ret != LOS_OK) {
diff --git a/kernel/base/core/los_sortlink.c b/kernel/base/core/los_sortlink.c
index 8a997e50..6cb8b82b 100644
--- a/kernel/base/core/los_sortlink.c
+++ b/kernel/base/core/los_sortlink.c
@@ -127,7 +127,7 @@ STATIC Percpu *OsFindIdleCpu(UINT16 *ildeCpuID)
Percpu *idleCpu = OsPercpuGetByID(0);
*ildeCpuID = 0;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
UINT16 cpuID = 1;
UINT32 nodeNum = idleCpu->taskSortLink.nodeNum + idleCpu->swtmrSortLink.nodeNum;
@@ -174,7 +174,7 @@ VOID OsAdd2SortLink(SortLinkList *node, UINT64 startTime, UINT32 waitTicks, Sort
LOS_SpinLockSave(spinLock, &intSave);
SET_SORTLIST_VALUE(node, startTime + (UINT64)waitTicks * OS_CYCLE_PER_TICK);
OsAddNode2SortLink(sortLinkHeader, node);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
node->cpuid = idleCpu;
if (idleCpu != ArchCurrCpuid()) {
LOS_MpSchedule(CPUID_TO_AFFI_MASK(idleCpu));
@@ -186,7 +186,7 @@ VOID OsAdd2SortLink(SortLinkList *node, UINT64 startTime, UINT32 waitTicks, Sort
VOID OsDeleteSortLink(SortLinkList *node, SortLinkType type)
{
UINT32 intSave;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
Percpu *cpu = OsPercpuGetByID(node->cpuid);
#else
Percpu *cpu = OsPercpuGetByID(0);
diff --git a/kernel/base/core/los_swtmr.c b/kernel/base/core/los_swtmr.c
index c2b0ba44..2cad2825 100644
--- a/kernel/base/core/los_swtmr.c
+++ b/kernel/base/core/los_swtmr.c
@@ -38,7 +38,7 @@
#include "los_task_pri.h"
-#if (LOSCFG_BASE_CORE_SWTMR == YES)
+#ifdef LOSCFG_BASE_CORE_SWTMR_ENABLE
#if (LOSCFG_BASE_CORE_SWTMR_LIMIT <= 0)
#error "swtmr maxnum cannot be zero"
#endif /* LOSCFG_BASE_CORE_SWTMR_LIMIT <= 0 */
@@ -84,7 +84,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 OsSwtmrTaskCreate(VOID)
swtmrTask.pcName = "Swt_Task";
swtmrTask.usTaskPrio = 0;
swtmrTask.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
swtmrTask.usCpuAffiMask = CPUID_TO_AFFI_MASK(cpuid);
#endif
ret = LOS_TaskCreate(&swtmrTaskID, &swtmrTask);
@@ -533,4 +533,4 @@ LITE_OS_SEC_TEXT UINT32 LOS_SwtmrDelete(UINT16 swtmrID)
return ret;
}
-#endif /* LOSCFG_BASE_CORE_SWTMR */
+#endif /* LOSCFG_BASE_CORE_SWTMR_ENABLE */
diff --git a/kernel/base/core/los_task.c b/kernel/base/core/los_task.c
index 2d00d589..0eadc9db 100644
--- a/kernel/base/core/los_task.c
+++ b/kernel/base/core/los_task.c
@@ -51,10 +51,10 @@
#ifdef LOSCFG_KERNEL_CPUP
#include "los_cpup_pri.h"
#endif
-#if (LOSCFG_BASE_CORE_SWTMR == YES)
+#ifdef LOSCFG_BASE_CORE_SWTMR_ENABLE
#include "los_swtmr_pri.h"
#endif
-#if (LOSCFG_KERNEL_LITEIPC == YES)
+#ifdef LOSCFG_KERNEL_LITEIPC
#include "hm_liteipc.h"
#endif
#ifdef LOSCFG_ENABLE_OOM_LOOP_TASK
@@ -98,7 +98,7 @@ VOID OsSetMainTask()
g_mainTask[i].taskStatus = OS_TASK_STATUS_UNUSED;
g_mainTask[i].taskID = LOSCFG_BASE_CORE_TSK_LIMIT;
g_mainTask[i].priority = OS_TASK_PRIORITY_LOWEST;
-#if (LOSCFG_KERNEL_SMP_LOCKDEP == YES)
+#ifdef LOSCFG_KERNEL_SMP_LOCKDEP
g_mainTask[i].lockDep.lockDepth = 0;
g_mainTask[i].lockDep.waitLock = NULL;
#endif
@@ -208,7 +208,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 OsTaskInit(VOID)
LOS_ListTailInsert(&g_losFreeTask, &g_taskCBArray[index].pendList);
}
-#if (LOSCFG_KERNEL_TRACE == YES)
+#ifdef LOSCFG_KERNEL_TRACE
LOS_TraceReg(LOS_TRACE_TASK, OsTaskTrace, LOS_TRACE_TASK_NAME, LOS_TRACE_ENABLE);
#endif
@@ -240,7 +240,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 OsIdleTaskCreate(VOID)
taskInitParam.pcName = "Idle";
taskInitParam.usTaskPrio = OS_TASK_PRIORITY_LOWEST;
taskInitParam.processID = OsGetIdleProcessID();
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
taskInitParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreateOnly(idleTaskID, &taskInitParam);
@@ -381,7 +381,7 @@ LITE_OS_SEC_TEXT_INIT STATIC VOID OsTaskStackAlloc(VOID **topStack, UINT32 stack
STATIC INLINE UINT32 OsTaskSyncCreate(LosTaskCB *taskCB)
{
-#if (LOSCFG_KERNEL_SMP_TASK_SYNC == YES)
+#ifdef LOSCFG_KERNEL_SMP_TASK_SYNC
UINT32 ret = LOS_SemCreate(0, &taskCB->syncSignal);
if (ret != LOS_OK) {
return LOS_ERRNO_TSK_MP_SYNC_RESOURCE;
@@ -394,7 +394,7 @@ STATIC INLINE UINT32 OsTaskSyncCreate(LosTaskCB *taskCB)
STATIC INLINE VOID OsTaskSyncDestroy(UINT32 syncSignal)
{
-#if (LOSCFG_KERNEL_SMP_TASK_SYNC == YES)
+#ifdef LOSCFG_KERNEL_SMP_TASK_SYNC
(VOID)LOS_SemDelete(syncSignal);
#else
(VOID)syncSignal;
@@ -403,7 +403,7 @@ STATIC INLINE VOID OsTaskSyncDestroy(UINT32 syncSignal)
LITE_OS_SEC_TEXT UINT32 OsTaskSyncWait(const LosTaskCB *taskCB)
{
-#if (LOSCFG_KERNEL_SMP_TASK_SYNC == YES)
+#ifdef LOSCFG_KERNEL_SMP_TASK_SYNC
UINT32 ret = LOS_OK;
LOS_ASSERT(LOS_SpinHeld(&g_taskSpin));
@@ -428,7 +428,7 @@ LITE_OS_SEC_TEXT UINT32 OsTaskSyncWait(const LosTaskCB *taskCB)
STATIC INLINE VOID OsTaskSyncWake(const LosTaskCB *taskCB)
{
-#if (LOSCFG_KERNEL_SMP_TASK_SYNC == YES)
+#ifdef LOSCFG_KERNEL_SMP_TASK_SYNC
(VOID)OsSemPostUnsafe(taskCB->syncSignal, NULL);
#else
(VOID)taskCB;
@@ -485,7 +485,7 @@ LITE_OS_SEC_TEXT VOID OsTaskResourcesToFree(LosTaskCB *taskCB)
processCB->processID, taskCB->taskID, mapBase, mapSize, ret);
}
-#if (LOSCFG_KERNEL_LITEIPC == YES)
+#ifdef LOSCFG_KERNEL_LITEIPC
LiteIpcRemoveServiceHandle(taskCB);
#endif
}
@@ -494,7 +494,7 @@ LITE_OS_SEC_TEXT VOID OsTaskResourcesToFree(LosTaskCB *taskCB)
if (taskCB->taskStatus & OS_TASK_STATUS_UNUSED) {
topOfStack = taskCB->topOfStack;
taskCB->topOfStack = 0;
-#if (LOSCFG_KERNEL_SMP_TASK_SYNC == YES)
+#ifdef LOSCFG_KERNEL_SMP_TASK_SYNC
syncSignal = taskCB->syncSignal;
taskCB->syncSignal = LOSCFG_BASE_IPC_SEM_LIMIT;
#endif
@@ -523,12 +523,12 @@ LITE_OS_SEC_TEXT_INIT STATIC VOID OsTaskCBInitBase(LosTaskCB *taskCB,
taskCB->taskEntry = initParam->pfnTaskEntry;
taskCB->signal = SIGNAL_NONE;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
taskCB->currCpu = OS_TASK_INVALID_CPUID;
taskCB->cpuAffiMask = (initParam->usCpuAffiMask) ?
initParam->usCpuAffiMask : LOSCFG_KERNEL_CPU_MASK;
#endif
-#if (LOSCFG_KERNEL_LITEIPC == YES)
+#ifdef LOSCFG_KERNEL_LITEIPC
LOS_ListInit(&(taskCB->msgListHead));
#endif
taskCB->policy = (initParam->policy == LOS_SCHED_FIFO) ? LOS_SCHED_FIFO : LOS_SCHED_RR;
@@ -654,7 +654,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 LOS_TaskCreateOnly(UINT32 *taskID, TSK_INIT_PARAM_S
LOS_ERREND_TCB_INIT:
(VOID)LOS_MemFree(pool, topStack);
LOS_ERREND_REWIND_SYNC:
-#if (LOSCFG_KERNEL_SMP_TASK_SYNC == YES)
+#ifdef LOSCFG_KERNEL_SMP_TASK_SYNC
OsTaskSyncDestroy(taskCB->syncSignal);
#endif
LOS_ERREND_REWIND_TCB:
@@ -769,7 +769,7 @@ LITE_OS_SEC_TEXT_INIT STATIC BOOL OsTaskSuspendCheckOnRun(LosTaskCB *taskCB, UIN
/* init default out return value */
*ret = LOS_OK;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
/* ASYNCHRONIZED. No need to do task lock checking */
if (taskCB->currCpu != ArchCurrCpuid()) {
taskCB->signal = SIGNAL_SUSPEND;
@@ -909,7 +909,7 @@ STATIC BOOL OsRunTaskToDeleteCheckOnRun(LosTaskCB *taskCB, UINT32 *ret)
/* init default out return value */
*ret = LOS_OK;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
/* ASYNCHRONIZED. No need to do task lock checking */
if (taskCB->currCpu != ArchCurrCpuid()) {
/*
@@ -994,7 +994,7 @@ LITE_OS_SEC_TEXT UINT32 OsTaskDeleteUnsafe(LosTaskCB *taskCB, UINT32 status, UIN
SCHEDULER_LOCK(intSave);
}
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
LOS_ASSERT(OsPercpuGet()->taskLockCnt == 1);
#else
LOS_ASSERT(OsPercpuGet()->taskLockCnt == 0);
@@ -1235,7 +1235,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 LOS_TaskInfoGet(UINT32 taskID, TSK_INFO_S *taskInf
LITE_OS_SEC_TEXT BOOL OsTaskCpuAffiSetUnsafe(UINT32 taskID, UINT16 newCpuAffiMask, UINT16 *oldCpuAffiMask)
{
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
LosTaskCB *taskCB = OS_TCB_FROM_TID(taskID);
taskCB->cpuAffiMask = newCpuAffiMask;
@@ -1286,7 +1286,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 LOS_TaskCpuAffiSet(UINT32 taskID, UINT16 cpuAffiMa
LITE_OS_SEC_TEXT_MINOR UINT16 LOS_TaskCpuAffiGet(UINT32 taskID)
{
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
#define INVALID_CPU_AFFI_MASK 0
LosTaskCB *taskCB = NULL;
UINT16 cpuAffiMask;
@@ -1346,7 +1346,7 @@ LITE_OS_SEC_TEXT_MINOR VOID OsTaskProcSignal(VOID)
/* suspend killed task may fail, ignore the result */
(VOID)LOS_TaskSuspend(runTask->taskID);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
} else if (runTask->signal & SIGNAL_AFFI) {
runTask->signal &= ~SIGNAL_AFFI;
@@ -1406,7 +1406,7 @@ STATIC VOID OsExitGroupActiveTaskKilled(LosProcessCB *processCB, LosTaskCB *task
INT32 ret;
taskCB->taskStatus |= OS_TASK_FLAG_EXIT_KILL;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
/* The other core that the thread is running on and is currently running in a non-system call */
if (!taskCB->sig.sigIntLock && (taskCB->taskStatus & OS_TASK_STATUS_RUNNING)) {
taskCB->signal = SIGNAL_KILL;
diff --git a/kernel/base/core/los_tick.c b/kernel/base/core/los_tick.c
index e799e4db..b5c2794e 100644
--- a/kernel/base/core/los_tick.c
+++ b/kernel/base/core/los_tick.c
@@ -57,7 +57,7 @@ LITE_OS_SEC_TEXT VOID OsTickHandler(VOID)
OsVdsoTimevalUpdate();
#endif
-#if (LOSCFG_BASE_CORE_TICK_HW_TIME == YES)
+#ifdef LOSCFG_BASE_CORE_TICK_HW_TIME
HalClockIrqClear(); /* diff from every platform */
#endif
diff --git a/kernel/base/include/los_percpu_pri.h b/kernel/base/include/los_percpu_pri.h
index 0a82c530..70662bf1 100644
--- a/kernel/base/include/los_percpu_pri.h
+++ b/kernel/base/include/los_percpu_pri.h
@@ -43,7 +43,7 @@ extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
typedef enum {
CPU_RUNNING = 0, /* cpu is running */
CPU_HALT, /* cpu in the halt */
@@ -66,7 +66,7 @@ typedef struct {
UINT32 swtmrTaskID; /* software timer task id */
UINT32 schedFlag; /* pending scheduler flag */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
UINT32 excFlag; /* cpu halt or exc flag */
#endif
} Percpu;
diff --git a/kernel/base/include/los_process_pri.h b/kernel/base/include/los_process_pri.h
index e07ea820..8cf6b7c0 100644
--- a/kernel/base/include/los_process_pri.h
+++ b/kernel/base/include/los_process_pri.h
@@ -36,7 +36,7 @@
#include "los_sem_pri.h"
#include "los_process.h"
#include "los_vm_map.h"
-#if (LOSCFG_KERNEL_LITEIPC == YES)
+#ifdef LOSCFG_KERNEL_LITEIPC
#include "hm_liteipc.h"
#endif
#ifdef LOSCFG_SECURITY_CAPABILITY
@@ -96,12 +96,12 @@ typedef struct ProcessCB {
volatile UINT32 threadNumber; /**< Number of threads alive under this process */
UINT32 threadCount; /**< Total number of threads created under this process */
LOS_DL_LIST waitList; /**< The process holds the waitLits to support wait/waitpid */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
UINT32 timerCpu; /**< CPU core number of this task is delayed or pended */
#endif
UINTPTR sigHandler; /**< Signal handler */
sigset_t sigShare; /**< Signal share bit */
-#if (LOSCFG_KERNEL_LITEIPC == YES)
+#ifdef LOSCFG_KERNEL_LITEIPC
ProcIpcInfo ipcInfo; /**< Memory pool for lite ipc */
#endif
#ifdef LOSCFG_KERNEL_VM
diff --git a/kernel/base/include/los_sched_pri.h b/kernel/base/include/los_sched_pri.h
index e5f1ea7c..21af8ce6 100644
--- a/kernel/base/include/los_sched_pri.h
+++ b/kernel/base/include/los_sched_pri.h
@@ -112,7 +112,7 @@ STATIC INLINE BOOL OsPreemptableInSched(VOID)
{
BOOL preemptable = FALSE;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
/*
* For smp systems, schedule must hold the task spinlock, and this counter
* will increase by 1 in that case.
diff --git a/kernel/base/include/los_sortlink_pri.h b/kernel/base/include/los_sortlink_pri.h
index fa2edf17..07a04d91 100644
--- a/kernel/base/include/los_sortlink_pri.h
+++ b/kernel/base/include/los_sortlink_pri.h
@@ -50,7 +50,7 @@ typedef enum {
typedef struct {
LOS_DL_LIST sortLinkNode;
UINT64 responseTime;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
UINT32 cpuid;
#endif
} SortLinkList;
diff --git a/kernel/base/include/los_task_pri.h b/kernel/base/include/los_task_pri.h
index 778f9c00..b19f74e8 100644
--- a/kernel/base/include/los_task_pri.h
+++ b/kernel/base/include/los_task_pri.h
@@ -344,14 +344,14 @@ typedef struct {
INT32 errorNo; /**< Error Num */
UINT32 signal; /**< Task signal */
sig_cb sig;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
UINT16 currCpu; /**< CPU core number of this task is running on */
UINT16 lastCpu; /**< CPU core number of this task is running on last time */
UINT16 cpuAffiMask; /**< CPU affinity mask, support up to 16 cores */
-#if (LOSCFG_KERNEL_SMP_TASK_SYNC == YES)
+#ifdef LOSCFG_KERNEL_SMP_TASK_SYNC
UINT32 syncSignal; /**< Synchronization for signal handling */
#endif
-#if (LOSCFG_KERNEL_SMP_LOCKDEP == YES)
+#ifdef LOSCFG_KERNEL_SMP_LOCKDEP
LockDep lockDep;
#endif
#endif
@@ -368,7 +368,7 @@ typedef struct {
UINTPTR waitID; /**< Wait for the PID or GID of the child process */
UINT16 waitFlag; /**< The type of child process that is waiting, belonging to a group or parent,
a specific child process, or any child process */
-#if (LOSCFG_KERNEL_LITEIPC == YES)
+#ifdef LOSCFG_KERNEL_LITEIPC
UINT32 ipcStatus;
LOS_DL_LIST msgListHead;
BOOL accessMap[LOSCFG_BASE_CORE_TSK_LIMIT];
diff --git a/kernel/base/ipc/los_event.c b/kernel/base/ipc/los_event.c
index fd872d64..4b745f88 100644
--- a/kernel/base/ipc/los_event.c
+++ b/kernel/base/ipc/los_event.c
@@ -35,7 +35,7 @@
#include "los_mp.h"
#include "los_percpu_pri.h"
#include "los_sched_pri.h"
-#if (LOSCFG_BASE_CORE_SWTMR == YES)
+#ifdef LOSCFG_BASE_CORE_SWTMR_ENABLE
#include "los_exc.h"
#endif
diff --git a/kernel/base/ipc/los_mux.c b/kernel/base/ipc/los_mux.c
index 7dc321af..61ee89e0 100644
--- a/kernel/base/ipc/los_mux.c
+++ b/kernel/base/ipc/los_mux.c
@@ -38,7 +38,7 @@
#include "los_sched_pri.h"
-#if (LOSCFG_BASE_IPC_MUX == YES)
+#ifdef LOSCFG_BASE_IPC_MUX
#define MUTEXATTR_TYPE_MASK 0x0FU
LITE_OS_SEC_TEXT UINT32 LOS_MuxAttrInit(LosMuxAttr *attr)
@@ -560,5 +560,5 @@ LITE_OS_SEC_TEXT UINT32 LOS_MuxUnlock(LosMux *mutex)
return ret;
}
-#endif /* (LOSCFG_BASE_IPC_MUX == YES) */
+#endif /* LOSCFG_BASE_IPC_MUX */
diff --git a/kernel/base/ipc/los_queue.c b/kernel/base/ipc/los_queue.c
index 983e11f1..be4d176f 100644
--- a/kernel/base/ipc/los_queue.c
+++ b/kernel/base/ipc/los_queue.c
@@ -38,7 +38,7 @@
#include "los_percpu_pri.h"
-#if (LOSCFG_BASE_IPC_QUEUE == YES)
+#ifdef LOSCFG_BASE_IPC_QUEUE
#if (LOSCFG_BASE_IPC_QUEUE_LIMIT <= 0)
#error "queue maxnum cannot be zero"
#endif /* LOSCFG_BASE_IPC_QUEUE_LIMIT <= 0 */
@@ -493,5 +493,5 @@ QUEUE_END:
return ret;
}
-#endif /* (LOSCFG_BASE_IPC_QUEUE == YES) */
+#endif /* LOSCFG_BASE_IPC_QUEUE */
diff --git a/kernel/base/ipc/los_sem.c b/kernel/base/ipc/los_sem.c
index 7f80a0ae..a6f10a80 100644
--- a/kernel/base/ipc/los_sem.c
+++ b/kernel/base/ipc/los_sem.c
@@ -40,7 +40,7 @@
#include "los_percpu_pri.h"
-#if (LOSCFG_BASE_IPC_SEM == YES)
+#ifdef LOSCFG_BASE_IPC_SEM
#if (LOSCFG_BASE_IPC_SEM_LIMIT <= 0)
#error "sem maxnum cannot be zero"
@@ -283,5 +283,5 @@ LITE_OS_SEC_TEXT UINT32 LOS_SemPost(UINT32 semHandle)
return ret;
}
-#endif /* (LOSCFG_BASE_IPC_SEM == YES) */
+#endif /* LOSCFG_BASE_IPC_SEM */
diff --git a/kernel/base/mem/tlsf/los_memory.c b/kernel/base/mem/tlsf/los_memory.c
index a958ce92..0642a692 100644
--- a/kernel/base/mem/tlsf/los_memory.c
+++ b/kernel/base/mem/tlsf/los_memory.c
@@ -147,7 +147,7 @@ struct OsMemPoolInfo {
VOID *pool;
UINT32 totalSize;
UINT32 attr;
-#if defined(OS_MEM_WATERLINE) && (OS_MEM_WATERLINE == YES)
+#ifdef LOSCFG_MEM_WATERLINE
UINT32 waterLine; /* Maximum usage size in a memory pool */
UINT32 curUsedSize; /* Current usage size in a memory pool */
#endif
@@ -230,7 +230,7 @@ STATIC INLINE VOID OsMemNodeSetTaskID(struct OsMemUsedNodeHead *node)
}
#endif
-#if defined(OS_MEM_WATERLINE) && (OS_MEM_WATERLINE == YES)
+#ifdef LOSCFG_MEM_WATERLINE
STATIC INLINE VOID OsMemWaterUsedRecord(struct OsMemPoolHead *pool, UINT32 size)
{
pool->info.curUsedSize += size;
@@ -775,7 +775,7 @@ STATIC UINT32 OsMemPoolInit(VOID *pool, UINT32 size)
endNode->ptr.prev = newNode;
OS_MEM_NODE_SET_USED_FLAG(endNode->sizeAndFlag);
#endif
-#if defined(OS_MEM_WATERLINE) && (OS_MEM_WATERLINE == YES)
+#ifdef LOSCFG_MEM_WATERLINE
poolHead->info.curUsedSize = sizeof(struct OsMemPoolHead) + OS_MEM_NODE_HEAD_SIZE;
poolHead->info.waterLine = poolHead->info.curUsedSize;
#endif
@@ -1171,7 +1171,7 @@ STATIC INLINE UINT32 OsMemFree(struct OsMemPoolHead *pool, struct OsMemNodeHead
return ret;
}
-#if defined(OS_MEM_WATERLINE) && (OS_MEM_WATERLINE == YES)
+#ifdef LOSCFG_MEM_WATERLINE
pool->info.curUsedSize -= OS_MEM_NODE_GET_SIZE(node->sizeAndFlag);
#endif
@@ -1256,14 +1256,14 @@ UINT32 LOS_MemFree(VOID *pool, VOID *ptr)
STATIC INLINE VOID OsMemReAllocSmaller(VOID *pool, UINT32 allocSize, struct OsMemNodeHead *node, UINT32 nodeSize)
{
-#if defined(OS_MEM_WATERLINE) && (OS_MEM_WATERLINE == YES)
+#ifdef LOSCFG_MEM_WATERLINE
struct OsMemPoolHead *poolInfo = (struct OsMemPoolHead *)pool;
#endif
node->sizeAndFlag = nodeSize;
if ((allocSize + OS_MEM_NODE_HEAD_SIZE + OS_MEM_MIN_ALLOC_SIZE) <= nodeSize) {
OsMemSplitNode(pool, node, allocSize);
OS_MEM_NODE_SET_USED_FLAG(node->sizeAndFlag);
-#if defined(OS_MEM_WATERLINE) && (OS_MEM_WATERLINE == YES)
+#ifdef LOSCFG_MEM_WATERLINE
poolInfo->info.curUsedSize -= nodeSize - allocSize;
#endif
}
@@ -1603,7 +1603,7 @@ STATIC VOID OsMemPoolHeadCheck(const struct OsMemPoolHead *pool)
OUT:
if (flag) {
PRINTK("mem pool info: poolAddr: %#x, poolSize: 0x%x\n", pool, pool->info.totalSize);
-#if defined(OS_MEM_WATERLINE) && (OS_MEM_WATERLINE == YES)
+#ifdef LOSCFG_MEM_WATERLINE
PRINTK("mem pool info: poolWaterLine: 0x%x, poolCurUsedSize: 0x%x\n", pool->info.waterLine,
pool->info.curUsedSize);
#endif
@@ -1844,7 +1844,7 @@ UINT32 LOS_MemInfoGet(VOID *pool, LOS_MEM_POOL_STATUS *poolStatus)
OsMemInfoGet(poolInfo, tmpNode, poolStatus);
}
#endif
-#if defined(OS_MEM_WATERLINE) && (OS_MEM_WATERLINE == YES)
+#ifdef LOSCFG_MEM_WATERLINE
poolStatus->usageWaterLine = poolInfo->info.waterLine;
#endif
MEM_UNLOCK(poolInfo, intSave);
@@ -1861,7 +1861,7 @@ STATIC VOID OsMemInfoPrint(VOID *pool)
return;
}
-#if defined(OS_MEM_WATERLINE) && (OS_MEM_WATERLINE == YES)
+#ifdef LOSCFG_MEM_WATERLINE
PRINTK("pool addr pool size used size free size "
"max free node size used node num free node num UsageWaterLine\n");
PRINTK("--------------- -------- ------- -------- "
diff --git a/kernel/base/misc/sysinfo_shellcmd.c b/kernel/base/misc/sysinfo_shellcmd.c
index 31431743..ba9186f8 100644
--- a/kernel/base/misc/sysinfo_shellcmd.c
+++ b/kernel/base/misc/sysinfo_shellcmd.c
@@ -119,9 +119,21 @@ UINT32 OsShellCmdSwtmrCntGet(VOID)
LITE_OS_SEC_TEXT_MINOR VOID OsShellCmdSystemInfoGet(VOID)
{
UINT8 isTaskEnable = YES;
- UINT8 isSemEnable = LOSCFG_BASE_IPC_SEM;
- UINT8 isQueueEnable = LOSCFG_BASE_IPC_QUEUE;
- UINT8 isSwtmrEnable = LOSCFG_BASE_CORE_SWTMR;
+#ifdef LOSCFG_BASE_IPC_SEM
+ UINT8 isSemEnable = YES;
+#else
+ UINT8 isSemEnable = NO;
+#endif
+#ifdef LOSCFG_BASE_IPC_QUEUE
+ UINT8 isQueueEnable = YES;
+#else
+ UINT8 isQueueEnable = NO;
+#endif
+#ifdef LOSCFG_BASE_CORE_SWTMR_ENABLE
+ UINT8 isSwtmrEnable = YES;
+#else
+ UINT8 isSwtmrEnable = NO;
+#endif
PRINTK("\n Module Used Total Enabled\n");
PRINTK("--------------------------------------------\n");
diff --git a/kernel/base/misc/task_shellcmd.c b/kernel/base/misc/task_shellcmd.c
index 085788ad..05623a56 100644
--- a/kernel/base/misc/task_shellcmd.c
+++ b/kernel/base/misc/task_shellcmd.c
@@ -428,7 +428,7 @@ EXIT:
STATIC VOID OsShellCmdTskInfoTitle(VOID *seqBuf, UINT16 flag)
{
PROCESS_INFO_SHOW(seqBuf, "\r\n TID PID ");
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
PROCESS_INFO_SHOW(seqBuf, "Affi CPU ");
#endif
PROCESS_INFO_SHOW(seqBuf, " Status StackSize WaterLine ");
@@ -456,7 +456,7 @@ STATIC INLINE VOID OsShellTskInfoData(const LosTaskCB *taskCB, VOID *seqBuf, UIN
#endif
PROCESS_INFO_SHOW(seqBuf, " %4u%5u", taskCB->taskID, taskCB->processID);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
PROCESS_INFO_SHOW(seqBuf, "%#5x%4d ", taskCB->cpuAffiMask, (INT16)(taskCB->currCpu));
#endif
diff --git a/kernel/base/mp/los_lockdep.c b/kernel/base/mp/los_lockdep.c
index 2f2ac0b8..2b850eb7 100644
--- a/kernel/base/mp/los_lockdep.c
+++ b/kernel/base/mp/los_lockdep.c
@@ -37,7 +37,7 @@
#include "los_exc.h"
-#if (LOSCFG_KERNEL_SMP_LOCKDEP == YES)
+#ifdef LOSCFG_KERNEL_SMP_LOCKDEP
#define LOCKDEP_GET_NAME(lockDep, index) (((SPIN_LOCK_S *)((lockDep)->heldLocks[(index)].lockPtr))->name)
#define LOCKDEP_GET_ADDR(lockDep, index) ((lockDep)->heldLocks[(index)].lockAddr)
diff --git a/kernel/base/mp/los_mp.c b/kernel/base/mp/los_mp.c
index c98cc01e..7bdce6ac 100644
--- a/kernel/base/mp/los_mp.c
+++ b/kernel/base/mp/los_mp.c
@@ -36,7 +36,7 @@
#include "los_swtmr.h"
#include "los_task_pri.h"
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
VOID LOS_MpSchedule(UINT32 target)
{
diff --git a/kernel/base/mp/los_spinlock.c b/kernel/base/mp/los_spinlock.c
index 385291ec..991af71d 100644
--- a/kernel/base/mp/los_spinlock.c
+++ b/kernel/base/mp/los_spinlock.c
@@ -30,7 +30,7 @@
*/
#include "los_spinlock.h"
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
#include "los_sched_pri.h"
diff --git a/kernel/base/mp/los_stat.c b/kernel/base/mp/los_stat.c
index 04e71f7d..a0d25ca0 100644
--- a/kernel/base/mp/los_stat.c
+++ b/kernel/base/mp/los_stat.c
@@ -32,7 +32,7 @@
#include "los_task_pri.h"
-#if (LOSCFG_KERNEL_SCHED_STATISTICS == YES)
+#ifdef LOSCFG_KERNEL_SCHED_STATISTICS
#define HIGHTASKPRI 16
#define NS_PER_MS 1000000
#define DECIMAL_TO_PERCENTAGE 100
@@ -212,7 +212,7 @@ LITE_OS_SEC_TEXT_MINOR VOID OsShellMpStaticStart(VOID)
for (loop = 0; loop < g_taskMaxNum; loop++) {
taskCB = (((LosTaskCB *)g_taskCBArray) + loop);
if (taskCB->taskStatus & OS_TASK_STATUS_RUNNING) {
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
cpuid = taskCB->currCpu;
#endif
if ((UINT32)(OS_TASK_INVALID_CPUID) == cpuid) {
@@ -293,7 +293,7 @@ LITE_OS_SEC_TEXT_MINOR VOID OsShellMpStaticStop(VOID)
for (loop = 0; loop < g_taskMaxNum; loop++) {
taskCB = (((LosTaskCB *)g_taskCBArray) + loop);
if (taskCB->taskStatus & OS_TASK_STATUS_RUNNING) {
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
cpuid = taskCB->currCpu;
#endif
if (cpuid == (UINT32)(OS_TASK_INVALID_CPUID)) {
diff --git a/kernel/base/sched/sched_sq/los_sched.c b/kernel/base/sched/sched_sq/los_sched.c
index 5ab81c4b..099d83be 100644
--- a/kernel/base/sched/sched_sq/los_sched.c
+++ b/kernel/base/sched/sched_sq/los_sched.c
@@ -39,7 +39,7 @@
#endif
#include "los_hw_tick_pri.h"
#include "los_tick_pri.h"
-#if (LOSCFG_BASE_CORE_TSK_MONITOR == YES)
+#ifdef LOSCFG_BASE_CORE_TSK_MONITOR
#include "los_stackinfo_pri.h"
#endif
#include "los_mp.h"
@@ -443,7 +443,7 @@ STATIC INLINE VOID OsSchedWakePendTimeTask(UINT64 currTime, LosTaskCB *taskCB, B
if (tempStatus & (OS_TASK_STATUS_PENDING | OS_TASK_STATUS_DELAY)) {
taskCB->taskStatus &= ~(OS_TASK_STATUS_PENDING | OS_TASK_STATUS_PEND_TIME | OS_TASK_STATUS_DELAY);
if (tempStatus & OS_TASK_STATUS_PENDING) {
-#if (LOSCFG_KERNEL_LITEIPC == YES)
+#ifdef LOSCFG_KERNEL_LITEIPC
taskCB->ipcStatus &= ~IPC_THREAD_STATUS_PEND;
#endif
taskCB->taskStatus |= OS_TASK_STATUS_TIMEOUT;
@@ -819,7 +819,7 @@ STATIC LosTaskCB *OsGetTopTask(VOID)
UINT32 bitmap;
LosTaskCB *newTask = NULL;
UINT32 processBitmap = g_sched->queueBitmap;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
UINT32 cpuid = ArchCurrCpuid();
#endif
@@ -830,11 +830,11 @@ STATIC LosTaskCB *OsGetTopTask(VOID)
while (bitmap) {
priority = CLZ(bitmap);
LOS_DL_LIST_FOR_EACH_ENTRY(newTask, &queueList->priQueueList[priority], LosTaskCB, pendList) {
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
if (newTask->cpuAffiMask & (1U << cpuid)) {
#endif
goto FIND_TASK;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
}
#endif
}
@@ -869,7 +869,7 @@ VOID OsSchedStart(VOID)
OsSchedSetStartTime(HalClockGetCycles());
newTask->startTime = OsGerCurrSchedTimeCycle();
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
/*
* attention: current cpu needs to be set, in case first task deletion
* may fail because this flag mismatch with the real current cpu.
@@ -889,7 +889,7 @@ VOID OsSchedStart(VOID)
OsTaskContextLoad(newTask);
}
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
VOID OsSchedToUserReleaseLock(VOID)
{
/* The scheduling lock needs to be released before returning to user mode */
@@ -900,7 +900,7 @@ VOID OsSchedToUserReleaseLock(VOID)
}
#endif
-#if (LOSCFG_BASE_CORE_TSK_MONITOR == YES)
+#ifdef LOSCFG_BASE_CORE_TSK_MONITOR
STATIC VOID OsTaskStackCheck(LosTaskCB *runTask, LosTaskCB *newTask)
{
if (!OS_STACK_MAGIC_CHECK(runTask->topOfStack)) {
@@ -917,9 +917,9 @@ STATIC VOID OsTaskStackCheck(LosTaskCB *runTask, LosTaskCB *newTask)
STATIC INLINE VOID OsSchedSwitchCheck(LosTaskCB *runTask, LosTaskCB *newTask)
{
-#if (LOSCFG_BASE_CORE_TSK_MONITOR == YES)
+#ifdef LOSCFG_BASE_CORE_TSK_MONITOR
OsTaskStackCheck(runTask, newTask);
-#endif /* LOSCFG_BASE_CORE_TSK_MONITOR == YES */
+#endif /* LOSCFG_BASE_CORE_TSK_MONITOR */
OsTraceTaskSchedule(newTask, runTask);
}
@@ -955,7 +955,7 @@ STATIC VOID OsSchedTaskSwicth(LosTaskCB *runTask, LosTaskCB *newTask)
runTask->taskStatus &= ~OS_TASK_STATUS_RUNNING;
newTask->taskStatus |= OS_TASK_STATUS_RUNNING;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
/* mask new running task's owner processor */
runTask->currCpu = OS_TASK_INVALID_CPUID;
newTask->currCpu = ArchCurrCpuid();
@@ -1043,7 +1043,7 @@ VOID OsSchedIrqEndCheckNeedSched(VOID)
VOID OsSchedResched(VOID)
{
LOS_ASSERT(LOS_SpinHeld(&g_taskSpin));
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
LOS_ASSERT(OsPercpuGet()->taskLockCnt == 1);
#else
LOS_ASSERT(OsPercpuGet()->taskLockCnt == 0);
diff --git a/kernel/base/vm/oom.c b/kernel/base/vm/oom.c
index f0c3c471..176429d5 100644
--- a/kernel/base/vm/oom.c
+++ b/kernel/base/vm/oom.c
@@ -37,7 +37,7 @@
#include "los_vm_phys.h"
#include "los_vm_filemap.h"
#include "los_process_pri.h"
-#if (LOSCFG_BASE_CORE_SWTMR == YES)
+#ifdef LOSCFG_BASE_CORE_SWTMR_ENABLE
#include "los_swtmr_pri.h"
#endif
@@ -55,12 +55,12 @@ LITE_OS_SEC_TEXT_MINOR STATIC UINT32 OomScoreProcess(LosProcessCB *candidateProc
{
UINT32 actualPm;
-#if (LOSCFG_KERNEL_SMP != YES)
+#ifndef LOSCFG_KERNEL_SMP
(VOID)LOS_MuxAcquire(&candidateProcess->vmSpace->regionMux);
#endif
/* we only consider actual physical memory here. */
OsUProcessPmUsage(candidateProcess->vmSpace, NULL, &actualPm);
-#if (LOSCFG_KERNEL_SMP != YES)
+#ifndef LOSCFG_KERNEL_SMP
(VOID)LOS_MuxRelease(&candidateProcess->vmSpace->regionMux);
#endif
return actualPm;
diff --git a/kernel/common/console.c b/kernel/common/console.c
index c70466c3..461025cb 100644
--- a/kernel/common/console.c
+++ b/kernel/common/console.c
@@ -1662,7 +1662,7 @@ STATIC UINT32 ConsoleSendTask(UINTPTR param)
return LOS_OK;
}
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
VOID OsWaitConsoleSendTaskPend(UINT32 taskID)
{
UINT32 i;
diff --git a/kernel/common/console.h b/kernel/common/console.h
index ff50d3c8..68018385 100644
--- a/kernel/common/console.h
+++ b/kernel/common/console.h
@@ -120,7 +120,7 @@ extern INT32 FilepWrite(struct file *filep, const struct file_operations_vfs *fo
extern INT32 FilepPoll(struct file *filep, const struct file_operations_vfs *fops, poll_table *fds);
extern INT32 FilepIoctl(struct file *filep, const struct file_operations_vfs *fops, INT32 cmd, unsigned long arg);
extern INT32 GetFilepOps(const struct file *filep, struct file **privFilep, const struct file_operations_vfs **fops);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
extern VOID OsWaitConsoleSendTaskPend(UINT32 taskID);
extern VOID OsWakeConsoleSendTask(VOID);
#endif
diff --git a/kernel/common/los_config.c b/kernel/common/los_config.c
index afd45a78..adfafd70 100644
--- a/kernel/common/los_config.c
+++ b/kernel/common/los_config.c
@@ -65,7 +65,7 @@ SystemRebootFunc OsGetRebootHook(VOID)
extern UINT32 OsSystemInit(VOID);
extern VOID SystemInit(VOID);
-#if (LOSCFG_KERNEL_SMP == 1)
+#ifdef LOSCFG_KERNEL_SMP
extern VOID release_secondary_cores(VOID);
#endif
@@ -90,7 +90,7 @@ LITE_OS_SEC_TEXT_INIT STATIC UINT32 ArchEarlyInit(VOID)
HalClockFreqWrite(OS_SYS_CLOCK);
#endif
-#if (LOSCFG_PLATFORM_HWI == 1)
+#ifdef LOSCFG_PLATFORM_HWI
OsHwiInit();
#endif
@@ -118,7 +118,7 @@ LITE_OS_SEC_TEXT_INIT STATIC UINT32 OsIpcInit(VOID)
{
UINT32 ret;
-#if (LOSCFG_BASE_IPC_SEM == 1)
+#ifdef LOSCFG_BASE_IPC_SEM
ret = OsSemInit();
if (ret != LOS_OK) {
PRINT_ERR("OsSemInit error\n");
@@ -126,7 +126,7 @@ LITE_OS_SEC_TEXT_INIT STATIC UINT32 OsIpcInit(VOID)
}
#endif
-#if (LOSCFG_BASE_IPC_QUEUE == 1)
+#ifdef LOSCFG_BASE_IPC_QUEUE
ret = OsQueueInit();
if (ret != LOS_OK) {
PRINT_ERR("OsQueueInit error\n");
@@ -151,7 +151,7 @@ LITE_OS_SEC_TEXT_INIT STATIC UINT32 PlatformInit(VOID)
LITE_OS_SEC_TEXT_INIT STATIC UINT32 KModInit(VOID)
{
-#if (LOSCFG_BASE_CORE_SWTMR == 1)
+#ifdef LOSCFG_BASE_CORE_SWTMR_ENABLE
OsSwtmrInit();
#endif
return LOS_OK;
@@ -167,7 +167,7 @@ LITE_OS_SEC_TEXT_INIT VOID OsSystemInfo(VOID)
PRINT_RELEASE("\n******************Welcome******************\n\n"
"Processor : %s"
-#if (LOSCFG_KERNEL_SMP == 1)
+#ifdef LOSCFG_KERNEL_SMP
" * %d\n"
"Run Mode : SMP\n"
#else
@@ -179,7 +179,7 @@ LITE_OS_SEC_TEXT_INIT VOID OsSystemInfo(VOID)
"Kernel : %s %d.%d.%d.%d/%s\n"
"\n*******************************************\n",
LOS_CpuInfo(),
-#if (LOSCFG_KERNEL_SMP == 1)
+#ifdef LOSCFG_KERNEL_SMP
LOSCFG_KERNEL_SMP_CORE_NUM,
#endif
HalIrqVersion(), __DATE__, __TIME__,\
@@ -265,7 +265,7 @@ LITE_OS_SEC_TEXT_INIT INT32 OsMain(VOID)
OsInitCall(LOS_INIT_LEVEL_KMOD_EXTENDED);
-#if (LOSCFG_KERNEL_SMP == 1)
+#ifdef LOSCFG_KERNEL_SMP
release_secondary_cores();
#endif
@@ -303,7 +303,7 @@ STATIC UINT32 OsSystemInitTaskCreate(VOID)
sysTask.pcName = "SystemInit";
sysTask.usTaskPrio = LOSCFG_BASE_CORE_TSK_DEFAULT_PRIO;
sysTask.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == 1)
+#ifdef LOSCFG_KERNEL_SMP
sysTask.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
return LOS_TaskCreate(&taskID, &sysTask);
diff --git a/kernel/common/los_config.h b/kernel/common/los_config.h
index 520bf56a..3ce31935 100644
--- a/kernel/common/los_config.h
+++ b/kernel/common/los_config.h
@@ -116,16 +116,15 @@ extern UINT32 __heap_end;
* External configuration item for timer tailoring
*/
#ifndef LOSCFG_BASE_CORE_TICK_HW_TIME
-#define LOSCFG_BASE_CORE_TICK_HW_TIME NO
+#undef LOSCFG_BASE_CORE_TICK_HW_TIME
#endif
-
/****************************** Hardware interrupt module configuration ******************************/
/**
* @ingroup los_config
* Configuration item for hardware interrupt tailoring
*/
#ifndef LOSCFG_PLATFORM_HWI
-#define LOSCFG_PLATFORM_HWI YES
+#define LOSCFG_PLATFORM_HWI
#endif
/**
@@ -221,15 +220,7 @@ extern UINT32 __heap_end;
* Configuration item for task (stack) monitoring module tailoring
*/
#ifndef LOSCFG_BASE_CORE_TSK_MONITOR
-#define LOSCFG_BASE_CORE_TSK_MONITOR YES
-#endif
-
-/**
- * @ingroup los_config
- * Configuration item for task perf task filter hook
- */
-#ifndef OS_PERF_TSK_FILTER
-#define OS_PERF_TSK_FILTER NO
+#define LOSCFG_BASE_CORE_TSK_MONITOR
#endif
/****************************** Semaphore module configuration ******************************/
@@ -238,7 +229,7 @@ extern UINT32 __heap_end;
* Configuration item for semaphore module tailoring
*/
#ifndef LOSCFG_BASE_IPC_SEM
-#define LOSCFG_BASE_IPC_SEM YES
+#define LOSCFG_BASE_IPC_SEM
#endif
/**
@@ -263,7 +254,7 @@ extern UINT32 __heap_end;
* Configuration item for mutex module tailoring
*/
#ifndef LOSCFG_BASE_IPC_MUX
-#define LOSCFG_BASE_IPC_MUX YES
+#define LOSCFG_BASE_IPC_MUX
#endif
/****************************** Queue module configuration ********************************/
@@ -272,7 +263,7 @@ extern UINT32 __heap_end;
* Configuration item for queue module tailoring
*/
#ifndef LOSCFG_BASE_IPC_QUEUE
-#define LOSCFG_BASE_IPC_QUEUE YES
+#define LOSCFG_BASE_IPC_QUEUE
#endif
/**
@@ -283,14 +274,20 @@ extern UINT32 __heap_end;
#define LOSCFG_BASE_IPC_QUEUE_LIMIT 1024
#endif
/****************************** Software timer module configuration **************************/
-#if (LOSCFG_BASE_IPC_QUEUE == YES)
+#ifdef LOSCFG_BASE_IPC_QUEUE
/**
* @ingroup los_config
* Configuration item for software timer module tailoring
*/
-#ifndef LOSCFG_BASE_CORE_SWTMR
-#define LOSCFG_BASE_CORE_SWTMR YES
+#ifndef LOSCFG_BASE_CORE_SWTMR_ENABLE
+#define LOSCFG_BASE_CORE_SWTMR_ENABLE
+#endif
+
+#ifdef LOSCFG_BASE_CORE_SWTMR_ENABLE
+#define LOSCFG_BASE_CORE_SWTMR 1
+#else
+#define LOSCFG_BASE_CORE_SWTMR 0
#endif
/**
@@ -338,23 +335,7 @@ extern UINT32 __heap_end;
#endif
/****************************** SMP module configuration **************************/
-#ifndef LOSCFG_KERNEL_SMP
-#define LOSCFG_KERNEL_SMP NO
-#endif
-
-#ifndef LOSCFG_KERNEL_SMP_LOCKDEP
-#define LOSCFG_KERNEL_SMP_LOCKDEP NO
-#endif
-
-#ifndef LOSCFG_KERNEL_SMP_TASK_SYNC
-#define LOSCFG_KERNEL_SMP_TASK_SYNC NO
-#endif
-
-#ifndef LOSCFG_KERNEL_SCHED_STATISTICS
-#define LOSCFG_KERNEL_SCHED_STATISTICS NO
-#endif
-
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
#define LOSCFG_KERNEL_CORE_NUM LOSCFG_KERNEL_SMP_CORE_NUM
#else
#define LOSCFG_KERNEL_CORE_NUM 1
@@ -391,11 +372,6 @@ extern UINT32 __heap_end;
#define VERSION_NUM(a, b, c, d) (((a) << 24) | ((b) << 16) | (c) << 8 | (d))
#define KERNEL_OPEN_VERSION_NUM VERSION_NUM(KERNEL_MAJOR, KERNEL_MINOR, KERNEL_PATCH, KERNEL_ITRE)
-/****************************** Dynamic loading module configuration **************************/
-#ifndef OS_AUTOINIT_DYNLOADER
-#define OS_AUTOINIT_DYNLOADER YES
-#endif
-
/****************************** Exception information configuration ******************************/
#ifdef LOSCFG_SAVE_EXCINFO
/**
diff --git a/kernel/extended/liteipc/hm_liteipc.c b/kernel/extended/liteipc/hm_liteipc.c
index fc45bd7d..b836a6b1 100644
--- a/kernel/extended/liteipc/hm_liteipc.c
+++ b/kernel/extended/liteipc/hm_liteipc.c
@@ -40,7 +40,7 @@
#include "los_sched_pri.h"
#include "los_spinlock.h"
#include "los_task_pri.h"
-#if (LOSCFG_KERNEL_TRACE == YES)
+#ifdef LOSCFG_KERNEL_TRACE
#include "los_trace.h"
#include "los_trace_frame.h"
#endif
@@ -100,7 +100,7 @@ STATIC const struct file_operations_vfs g_liteIpcFops = {
.mmap = LiteIpcMmap, /* mmap */
};
-#if (LOSCFG_KERNEL_TRACE == YES)
+#ifdef LOSCFG_KERNEL_TRACE
typedef enum {
WRITE,
WRITE_DROP,
@@ -161,7 +161,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 OsLiteIpcInit(VOID)
for (i = 0; i < LOSCFG_BASE_CORE_PROCESS_LIMIT; i++) {
LOS_ListInit(&(g_ipcUsedNodelist[i]));
}
-#if (LOSCFG_KERNEL_TRACE == YES)
+#ifdef LOSCFG_KERNEL_TRACE
ret = LOS_TraceReg(LOS_TRACE_IPC, OsIpcTrace, LOS_TRACE_IPC_NAME, LOS_TRACE_ENABLE);
if (ret != LOS_OK) {
PRINT_ERR("liteipc LOS_TraceReg failed:%d\n", ret);
@@ -940,7 +940,7 @@ LITE_OS_SEC_TEXT STATIC UINT32 CheckPara(IpcContent *content, UINT32 *dstTid)
}
#if (USE_TIMESTAMP == YES)
if (now > msg->timestamp + LITEIPC_TIMEOUT_NS) {
-#if (LOSCFG_KERNEL_TRACE == YES)
+#ifdef LOSCFG_KERNEL_TRACE
IpcTrace(msg, WRITE_DROP, 0, msg->type);
#endif
PRINT_ERR("A timeout reply, request timestamp:%lld, now:%lld\n", msg->timestamp, now);
@@ -998,7 +998,7 @@ LITE_OS_SEC_TEXT STATIC UINT32 LiteIpcWrite(IpcContent *content)
SCHEDULER_LOCK(intSave);
LosTaskCB *tcb = OS_TCB_FROM_TID(dstTid);
LOS_ListTailInsert(&(tcb->msgListHead), &(buf->listNode));
-#if (LOSCFG_KERNEL_TRACE == YES)
+#ifdef LOSCFG_KERNEL_TRACE
IpcTrace(&buf->msg, WRITE, tcb->ipcStatus, buf->msg.type);
#endif
if (tcb->ipcStatus & IPC_THREAD_STATUS_PEND) {
@@ -1058,13 +1058,13 @@ LITE_OS_SEC_TEXT STATIC UINT32 CheckRecievedMsg(IpcListNode *node, IpcContent *c
ret = -EINVAL;
}
if (ret != LOS_OK) {
-#if (LOSCFG_KERNEL_TRACE == YES)
+#ifdef LOSCFG_KERNEL_TRACE
IpcTrace(&node->msg, READ_DROP, tcb->ipcStatus, node->msg.type);
#endif
(VOID)HandleSpecialObjects(LOS_CurTaskIDGet(), node, TRUE);
(VOID)LiteIpcNodeFree(LOS_GetCurrProcessID(), (VOID *)node);
} else {
-#if (LOSCFG_KERNEL_TRACE == YES)
+#ifdef LOSCFG_KERNEL_TRACE
IpcTrace(&node->msg, READ, tcb->ipcStatus, node->msg.type);
#endif
}
@@ -1086,14 +1086,14 @@ LITE_OS_SEC_TEXT STATIC UINT32 LiteIpcRead(IpcContent *content)
do {
SCHEDULER_LOCK(intSave);
if (LOS_ListEmpty(listHead)) {
-#if (LOSCFG_KERNEL_TRACE == YES)
+#ifdef LOSCFG_KERNEL_TRACE
IpcTrace(NULL, TRY_READ, tcb->ipcStatus, syncFlag ? MT_REPLY : MT_REQUEST);
#endif
tcb->ipcStatus |= IPC_THREAD_STATUS_PEND;
OsTaskWaitSetPendMask(OS_TASK_WAIT_LITEIPC, OS_INVALID_VALUE, timeout);
ret = OsSchedTaskWait(&g_ipcPendlist, timeout, TRUE);
if (ret == LOS_ERRNO_TSK_TIMEOUT) {
-#if (LOSCFG_KERNEL_TRACE == YES)
+#ifdef LOSCFG_KERNEL_TRACE
IpcTrace(NULL, READ_TIMEOUT, tcb->ipcStatus, syncFlag ? MT_REPLY : MT_REQUEST);
#endif
SCHEDULER_UNLOCK(intSave);
diff --git a/kernel/include/los_memory.h b/kernel/include/los_memory.h
index 3ced9ad0..8dd00599 100644
--- a/kernel/include/los_memory.h
+++ b/kernel/include/los_memory.h
@@ -77,19 +77,6 @@ extern UINT8 *m_aucSysMem0;
*/
extern UINT8 *m_aucSysMem1;
-/**
- * @ingroup los_memory
- * The memory Maximum memory usage statistics.
- * @attention
- *
- If running as debug mode, it will affect the performance of memory malloc and free.
- * - OS_MEM_WATERLINE=YES: open the function for Maximum memory usage statistics
- * - OS_MEM_WATERLINE=NO: close the function for Maximum memory usage statistics, it set to NO as usual
- *
- */
-#ifdef LOSCFG_MEM_WATERLINE
-#define OS_MEM_WATERLINE YES
-#endif
-
#ifdef LOSCFG_MEM_MUL_POOL
/**
* @ingroup los_memory
@@ -141,7 +128,7 @@ typedef struct {
UINT32 maxFreeNodeSize;
UINT32 usedNodeNum;
UINT32 freeNodeNum;
-#if defined(OS_MEM_WATERLINE) && (OS_MEM_WATERLINE == YES)
+#ifdef LOSCFG_MEM_WATERLINE
UINT32 usageWaterLine;
#endif
} LOS_MEM_POOL_STATUS;
diff --git a/kernel/include/los_mp.h b/kernel/include/los_mp.h
index 2b456620..dcb3e4cd 100644
--- a/kernel/include/los_mp.h
+++ b/kernel/include/los_mp.h
@@ -50,7 +50,7 @@ typedef enum {
LOS_MP_IPI_HALT,
} MP_IPI_TYPE;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
extern VOID LOS_MpSchedule(UINT32 target);
extern VOID OsMpWakeHandler(VOID);
extern VOID OsMpScheduleHandler(VOID);
diff --git a/kernel/include/los_spinlock.h b/kernel/include/los_spinlock.h
index 504fcfb0..8ee14b9d 100644
--- a/kernel/include/los_spinlock.h
+++ b/kernel/include/los_spinlock.h
@@ -49,14 +49,14 @@ extern INT32 ArchSpinTrylock(size_t *lock);
typedef struct Spinlock {
size_t rawLock;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
UINT32 cpuid;
VOID *owner;
const CHAR *name;
#endif
} SPIN_LOCK_S;
-#if (LOSCFG_KERNEL_SMP_LOCKDEP == YES)
+#ifdef LOSCFG_KERNEL_SMP_LOCKDEP
#define LOCKDEP_CHECK_IN(lock) OsLockDepCheckIn(lock)
#define LOCKDEP_RECORD(lock) OsLockDepRecord(lock)
#define LOCKDEP_CHECK_OUT(lock) OsLockDepCheckOut(lock)
@@ -68,7 +68,7 @@ typedef struct Spinlock {
#define LOCKDEP_CLEAR_LOCKS()
#endif
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
#define SPINLOCK_OWNER_INIT NULL
#define SPIN_LOCK_INITIALIZER(lockName) \
diff --git a/kernel/include/los_task.h b/kernel/include/los_task.h
index 49df83b3..6477c735 100644
--- a/kernel/include/los_task.h
+++ b/kernel/include/los_task.h
@@ -498,7 +498,7 @@ typedef struct tagTskInitParam {
UINTPTR auwArgs[4]; /**< Task parameters, of which the maximum number is four */
UINT32 uwStackSize; /**< Task stack size */
CHAR *pcName; /**< Task name */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
UINT16 usCpuAffiMask; /**< Task cpu affinity mask */
#endif
UINT32 uwResved; /**< It is automatically deleted if set to LOS_TASK_STATUS_DETACHED.
diff --git a/net/lwip-2.1/porting/src/sys_arch.c b/net/lwip-2.1/porting/src/sys_arch.c
index 9826fba7..7e08ec57 100644
--- a/net/lwip-2.1/porting/src/sys_arch.c
+++ b/net/lwip-2.1/porting/src/sys_arch.c
@@ -40,11 +40,11 @@
#include
#include
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
SPIN_LOCK_INIT(arch_protect_spin);
static u32_t lwprot_thread = LOS_ERRNO_TSK_ID_INVALID;
static int lwprot_count = 0;
-#endif /* LOSCFG_KERNEL_SMP == YES */
+#endif /* LOSCFG_KERNEL_SMP */
#define ROUND_UP_DIV(val, div) (((val) + (div) - 1) / (div))
@@ -103,7 +103,7 @@ u16_t lwip_standard_chksum(const void *dataptr, int len)
sys_prot_t sys_arch_protect(void)
{
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
/* Note that we are using spinlock instead of mutex for LiteOS-SMP here:
* 1. spinlock is more effective for short critical region protection.
* 2. this function is called only in task context, not in interrupt handler.
@@ -121,14 +121,14 @@ sys_prot_t sys_arch_protect(void)
}
#else
LOS_TaskLock();
-#endif /* LOSCFG_KERNEL_SMP == YES */
+#endif /* LOSCFG_KERNEL_SMP */
return 0; /* return value is unused */
}
void sys_arch_unprotect(sys_prot_t pval)
{
LWIP_UNUSED_ARG(pval);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
if (lwprot_thread == LOS_CurTaskIDGet()) {
lwprot_count--;
if (lwprot_count == 0) {
@@ -138,7 +138,7 @@ void sys_arch_unprotect(sys_prot_t pval)
}
#else
LOS_TaskUnlock();
-#endif /* LOSCFG_KERNEL_SMP == YES */
+#endif /* LOSCFG_KERNEL_SMP */
}
diff --git a/net/telnet/src/telnet_dev.c b/net/telnet/src/telnet_dev.c
index 06ab5685..0af77518 100644
--- a/net/telnet/src/telnet_dev.c
+++ b/net/telnet/src/telnet_dev.c
@@ -38,7 +38,7 @@
#include "pthread.h"
#include "los_printf.h"
-#if (LOSCFG_BASE_CORE_SWTMR == YES)
+#ifdef LOSCFG_BASE_CORE_SWTMR_ENABLE
#include "los_swtmr_pri.h"
#endif
#include "los_sched_pri.h"
@@ -265,7 +265,7 @@ STATIC ssize_t TelnetWrite(struct file *file, const CHAR *buf, const size_t bufL
}
if (telnetDev->clientFd != 0) {
-#if (LOSCFG_BASE_CORE_SWTMR == YES)
+#ifdef LOSCFG_BASE_CORE_SWTMR_ENABLE
/* DO NOT call blocking API in software timer task */
if (((LosTaskCB*)OsCurrTaskGet())->taskEntry == (TSK_ENTRY_FUNC)OsSwtmrTask) {
TelnetUnlock();
diff --git a/platform/main.c b/platform/main.c
index a021b1d9..7a9aa62c 100644
--- a/platform/main.c
+++ b/platform/main.c
@@ -40,13 +40,13 @@
#include "los_swtmr_pri.h"
#include "los_task_pri.h"
-#if (LOSCFG_KERNEL_SMP == 1)
+#ifdef LOSCFG_KERNEL_SMP
STATIC Atomic g_ncpu = 1;
#endif
LITE_OS_SEC_TEXT_INIT VOID secondary_cpu_start(VOID)
{
-#if (LOSCFG_KERNEL_SMP == 1)
+#ifdef LOSCFG_KERNEL_SMP
UINT32 cpuid = ArchCurrCpuid();
OsCurrTaskSet(OsGetMainTask());
@@ -73,7 +73,7 @@ LITE_OS_SEC_TEXT_INIT VOID secondary_cpu_start(VOID)
OsCurrProcessSet(OS_PCB_FROM_PID(OsGetKernelInitProcessID()));
OsInitCall(LOS_INIT_LEVEL_KMOD_BASIC);
-#if (LOSCFG_BASE_CORE_SWTMR == 1)
+#ifdef LOSCFG_BASE_CORE_SWTMR_ENABLE
OsSwtmrInit();
#endif
@@ -89,7 +89,7 @@ LITE_OS_SEC_TEXT_INIT VOID secondary_cpu_start(VOID)
#endif
}
-#if (LOSCFG_KERNEL_SMP == 1)
+#ifdef LOSCFG_KERNEL_SMP
#ifdef LOSCFG_TEE_ENABLE
#define TSP_CPU_ON 0xb2000011UL
STATIC INT32 raw_smc_send(UINT32 cmd)
diff --git a/syscall/process_syscall.c b/syscall/process_syscall.c
index b4f5d002..997f631c 100644
--- a/syscall/process_syscall.c
+++ b/syscall/process_syscall.c
@@ -1037,7 +1037,7 @@ int SysSchedGetAffinity(int id, unsigned int *cpuset, int flag)
}
}
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
cpuAffiMask = (unsigned int)OS_TCB_FROM_TID(taskID)->cpuAffiMask;
#else
cpuAffiMask = 1;
diff --git a/testsuites/kernel/include/iCunit.h b/testsuites/kernel/include/iCunit.h
index a0de0031..c0c67484 100644
--- a/testsuites/kernel/include/iCunit.h
+++ b/testsuites/kernel/include/iCunit.h
@@ -522,7 +522,7 @@ extern void ICunitSaveErr(iiUINT32 line, iiUINT32 retCode);
} while (0)
#endif
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
extern SPIN_LOCK_S g_testSuitSpin;
#define TESTSUIT_LOCK(state) LOS_SpinLockSave(&g_testSuitSpin, &(state))
#define TESTSUIT_UNLOCK(state) LOS_SpinUnlockRestore(&g_testSuitSpin, state)
diff --git a/testsuites/kernel/include/osTest.h b/testsuites/kernel/include/osTest.h
index 7ad31b69..901dcf72 100644
--- a/testsuites/kernel/include/osTest.h
+++ b/testsuites/kernel/include/osTest.h
@@ -96,7 +96,7 @@ extern "C" {
testTask.uwResved = LOS_TASK_STATUS_DETACHED; \
} while (0);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
#define TEST_TASK_PARAM_INIT_AFFI(testTask, task_name, entry, prio, affi) \
TEST_TASK_PARAM_INIT(testTask, task_name, entry, prio) \
testTask.usCpuAffiMask = affi;
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/It_smp_hwi.c b/testsuites/kernel/sample/kernel_base/core/hwi/It_smp_hwi.c
index 36bea719..68d45192 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/It_smp_hwi.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/It_smp_hwi.c
@@ -38,7 +38,7 @@ extern "C" {
#endif /* __cpluscplus */
VOID ItSuiteSmpHwi(VOID)
{
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
ItSmpLosHwi001();
ItSmpLosHwi002();
ItSmpLosHwi003();
@@ -84,7 +84,7 @@ VOID ItSuiteSmpHwi(VOID)
ItSmpLosHwiNest007();
ItSmpLosHwiNest008();
#endif
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, 1);
HalIrqSetAffinity(HWI_NUM_TEST1, 1);
HalIrqSetAffinity(HWI_NUM_TEST2, 1);
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_001.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_001.c
index aa823736..a60728b6 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_001.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_001.c
@@ -36,7 +36,7 @@
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static UINT32 g_testTimes;
static VOID HwiF01(void)
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_002.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_002.c
index 06fde600..bc8bbf94 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_002.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_002.c
@@ -36,7 +36,7 @@
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static VOID HwiF01(void)
{
LOS_AtomicInc(&g_testCount);
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_003.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_003.c
index f0b422da..c7cb8f1e 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_003.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_003.c
@@ -36,7 +36,7 @@
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static UINT32 g_testTimes;
static VOID HwiF01(void)
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_004.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_004.c
index ed809362..8a6e5138 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_004.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_004.c
@@ -37,7 +37,7 @@ extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static UINT32 g_testTimes;
static VOID HwiF01(void)
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_005.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_005.c
index 2a408e27..3811c4e1 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_005.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_005.c
@@ -36,7 +36,7 @@
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static VOID HwiF01(void)
{
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_006.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_006.c
index 221678df..f3d58cda 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_006.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_006.c
@@ -37,7 +37,7 @@ extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static VOID HwiF01(void)
{
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_007.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_007.c
index a63b39b0..1a901cc3 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_007.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_007.c
@@ -36,7 +36,7 @@
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static VOID HwiF01(void)
{
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_008.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_008.c
index b26f6adf..497d73eb 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_008.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_008.c
@@ -36,7 +36,7 @@
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static UINT32 g_ret = 0;
static VOID HwiF01(void)
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_009.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_009.c
index 22bb709f..f1541a4e 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_009.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_009.c
@@ -36,7 +36,7 @@
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static UINT32 g_ret = 0;
static VOID HwiF01(void)
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_010.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_010.c
index b28b2f42..230ae933 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_010.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_010.c
@@ -36,7 +36,7 @@
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static UINT32 g_szId[LOSCFG_KERNEL_CORE_NUM] = {0};
static VOID SwtmrF01(void)
{
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_011.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_011.c
index b9ee190b..d58221d9 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_011.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_011.c
@@ -36,7 +36,7 @@
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static UINT32 g_szId[LOSCFG_KERNEL_CORE_NUM] = {0};
static VOID SwtmrF01(void)
{
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_012.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_012.c
index 4d6ba350..ae21951c 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_012.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_012.c
@@ -36,7 +36,7 @@
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static UINT32 g_szId[LOSCFG_KERNEL_CORE_NUM] = {0};
static VOID SwtmrF01(void)
{
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_013.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_013.c
index 7c3a571e..9b4604b3 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_013.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_013.c
@@ -36,7 +36,7 @@
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static VOID SwtmrF01(void)
{
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_001.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_001.c
index 820e3858..7507779e 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_001.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_001.c
@@ -36,7 +36,7 @@
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static UINT32 g_targetCpuid;
static VOID HwiF01(void)
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_002.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_002.c
index a19ad70c..054771aa 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_002.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_002.c
@@ -36,7 +36,7 @@
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static UINT32 g_targetCpuid;
static VOID HwiF01(void)
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_003.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_003.c
index 180b5065..d7c82d16 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_003.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_003.c
@@ -36,7 +36,7 @@
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static UINT32 g_targetCpuid;
static VOID HwiF01(void)
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_004.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_004.c
index a37d3108..b1ef1588 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_004.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_004.c
@@ -36,7 +36,7 @@
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static UINT32 g_targetCpuid;
static VOID HwiF01(void)
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_005.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_005.c
index 663e37e4..03964fc9 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_005.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_005.c
@@ -36,7 +36,7 @@
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static UINT32 g_targetCpuid;
static VOID HwiF01(void)
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_006.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_006.c
index d7f2a75b..4e4cc7b2 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_006.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_006.c
@@ -36,7 +36,7 @@
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static UINT32 g_targetCpuid;
static UINT32 g_szId[LOSCFG_KERNEL_CORE_NUM] = {0};
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_007.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_007.c
index 3597112f..e8decb70 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_007.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_007.c
@@ -36,7 +36,7 @@
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static UINT32 g_targetCpuid;
/* for debugging */
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_008.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_008.c
index eb621014..ccfe146c 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_008.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_ipi_008.c
@@ -36,7 +36,7 @@
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static UINT32 g_targetCpuid;
static VOID SwtmrF01(void)
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_001.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_001.c
index 4d863e68..8bd2d2f0 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_001.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_001.c
@@ -36,7 +36,7 @@
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static UINT32 g_targetCpuid;
static VOID HwiF02(void)
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_002.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_002.c
index 6e334c56..4d8f9a27 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_002.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_002.c
@@ -36,7 +36,7 @@
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static UINT32 g_targetCpuid;
extern EVENT_CB_S g_event;
static VOID HwiF02(void)
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_003.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_003.c
index 8be106dd..9f71aa5d 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_003.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_003.c
@@ -36,7 +36,7 @@
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static UINT32 g_targetCpuid;
static VOID HwiF02(void)
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_004.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_004.c
index ef9720b0..62a285c0 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_004.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_004.c
@@ -36,7 +36,7 @@
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static UINT32 g_targetCpuid;
static VOID HwiF02(void)
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_005.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_005.c
index ce7aa34d..87414631 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_005.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_005.c
@@ -36,7 +36,7 @@
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static UINT32 g_targetCpuid;
static VOID HwiF02(void)
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_006.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_006.c
index f06786b3..fb416702 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_006.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_006.c
@@ -36,7 +36,7 @@
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static UINT32 g_targetCpuid;
static VOID HwiF02(void)
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_007.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_007.c
index 609c2275..b9050a8b 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_007.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_007.c
@@ -36,7 +36,7 @@
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static UINT32 g_targetCpuid;
static VOID HwiF02(void)
diff --git a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_008.c b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_008.c
index 9d6a4ef6..d1fea484 100644
--- a/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_008.c
+++ b/testsuites/kernel/sample/kernel_base/core/hwi/smp/It_smp_los_hwi_nest_008.c
@@ -36,7 +36,7 @@
extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static UINT32 g_targetCpuid;
static VOID HwiF02(void)
diff --git a/testsuites/kernel/sample/kernel_base/core/swtmr/It_los_swtmr.c b/testsuites/kernel/sample/kernel_base/core/swtmr/It_los_swtmr.c
index 7ad82c51..f49d472c 100644
--- a/testsuites/kernel/sample/kernel_base/core/swtmr/It_los_swtmr.c
+++ b/testsuites/kernel/sample/kernel_base/core/swtmr/It_los_swtmr.c
@@ -53,7 +53,7 @@ VOID ItSuiteLosSwtmr(VOID)
ItLosSwtmr053();
ItLosSwtmr058();
#endif
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
ItSmpLosSwtmr001(); /* Concurrent Multi-core */
ItSmpLosSwtmr002(); /* Stop Across Cores */
ItSmpLosSwtmr003();
diff --git a/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_033.c b/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_033.c
index 7aa9b526..40cf3c17 100644
--- a/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_033.c
+++ b/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_033.c
@@ -87,7 +87,7 @@ static UINT32 Testcase(VOID)
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, HwiF01, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
diff --git a/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_039.c b/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_039.c
index 954f9d1a..f349fdf7 100644
--- a/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_039.c
+++ b/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_039.c
@@ -74,7 +74,7 @@ static UINT32 Testcase(VOID)
hwiMode = 0;
ret = TEST_HwiCreate(HWI_NUM_TEST, hwiPrio, hwiMode, (HWI_PROC_FUNC)SwtmrF01, (HwiIrqParam *)arg);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT3);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
TestHwiTrigger(HWI_NUM_TEST);
diff --git a/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_040.c b/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_040.c
index d42b666c..c9e0dc7d 100644
--- a/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_040.c
+++ b/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_040.c
@@ -79,7 +79,7 @@ static UINT32 Testcase(VOID)
hwiMode = 0;
ret = TEST_HwiCreate(HWI_NUM_TEST, hwiPrio, hwiMode, (HWI_PROC_FUNC)HwiF01, (HwiIrqParam *)arg);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT3);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
diff --git a/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_041.c b/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_041.c
index 34a6aa23..05e28865 100644
--- a/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_041.c
+++ b/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_041.c
@@ -95,7 +95,7 @@ static UINT32 Testcase(VOID)
ret = TEST_HwiCreate(HWI_NUM_TEST, hwiPrio, hwiMode, (HWI_PROC_FUNC)SwtmrF01, (HwiIrqParam *)arg);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT5);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
diff --git a/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_043.c b/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_043.c
index 070da1c3..b0e37b0f 100644
--- a/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_043.c
+++ b/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_043.c
@@ -76,7 +76,7 @@ static UINT32 Testcase(VOID)
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, HwiF01, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
diff --git a/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_064.c b/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_064.c
index afcb99f4..543eab9c 100644
--- a/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_064.c
+++ b/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_064.c
@@ -72,7 +72,7 @@ static UINT32 Testcase(VOID)
hwiMode = 0;
ret = TEST_HwiCreate(HWI_NUM_TEST, hwiPrio, hwiMode, (HWI_PROC_FUNC)HwiF01, (HwiIrqParam *)arg);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT3);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
diff --git a/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_065.c b/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_065.c
index 190056f6..ddd739c2 100644
--- a/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_065.c
+++ b/testsuites/kernel/sample/kernel_base/core/swtmr/full/It_los_swtmr_065.c
@@ -72,7 +72,7 @@ static UINT32 Testcase(VOID)
hwiMode = 0;
ret = TEST_HwiCreate(HWI_NUM_TEST, hwiPrio, hwiMode, (HWI_PROC_FUNC)HwiF01, (HwiIrqParam *)arg);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT3);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
ret = LOS_SwtmrStart(g_swTmrID1);
diff --git a/testsuites/kernel/sample/kernel_base/core/task/It_los_task.c b/testsuites/kernel/sample/kernel_base/core/task/It_los_task.c
index 48f146bc..b200fc64 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/It_los_task.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/It_los_task.c
@@ -62,7 +62,7 @@ void ItSuiteLosTask(void)
ItLosTask105();
ItLosTask099();
ItLosTaskTimeslice001();
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
// reserved 20 for smoke test
ItSmpLosTask001(); /* Task Affinity */
ItSmpLosTask002(); /* Task Deletion Across Cores */
@@ -137,7 +137,7 @@ void ItSuiteLosTask(void)
ItLosTask072();
ItLosTask073();
ItLosTask074();
-#if (LOSCFG_KERNEL_SMP != YES)
+#ifndef LOSCFG_KERNEL_SMP
ItLosTask075();
#endif
ItLosTask076();
@@ -193,7 +193,7 @@ void ItSuiteLosTask(void)
ItLosTaskTimeslice002();
ItLosTaskTimeslice003();
ItLosTaskTimeslice004();
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
#ifndef LOSCFG_ARCH_FPU_DISABLE
ItSmpLosFloatSwitch001();
@@ -290,7 +290,7 @@ void ItSuiteLosTask(void)
ItSmpLosTask112();
ItSmpLosTask114();
ItSmpLosTask115();
-#if (LOSCFG_KERNEL_SMP_TASK_SYNC == NO)
+#ifndef LOSCFG_KERNEL_SMP_TASK_SYNC
ItSmpLosTask117();
#endif
ItSmpLosTask126();
@@ -325,7 +325,7 @@ void ItSuiteLosTask(void)
#endif
#endif
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, 1);
HalIrqSetAffinity(HWI_NUM_TEST1, 1);
HalIrqSetAffinity(HWI_NUM_TEST3, 1);
diff --git a/testsuites/kernel/sample/kernel_base/core/task/It_los_task.h b/testsuites/kernel/sample/kernel_base/core/task/It_los_task.h
index 9b0e9058..7f47bb5f 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/It_los_task.h
+++ b/testsuites/kernel/sample/kernel_base/core/task/It_los_task.h
@@ -51,7 +51,7 @@ extern "C" {
#define SWTMR_LOOP_NUM 10
#define TEST_HWI_RUNTIME 0x100000
#define TASK_LOOP_NUM 0x100000
-#if (YES == LOSCFG_BASE_CORE_SWTMR)
+#ifdef LOSCFG_BASE_CORE_SWTMR_ENABLE
#define TASK_EXISTED_NUM 4
#else
#define TASK_EXISTED_NUM 2
@@ -364,4 +364,4 @@ void ItLosTaskTimeslice004(void);
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#endif
\ No newline at end of file
+#endif
diff --git a/testsuites/kernel/sample/kernel_base/core/task/float/It_smp_los_float_switch_007.c b/testsuites/kernel/sample/kernel_base/core/task/float/It_smp_los_float_switch_007.c
index 3aee9fb0..ce199698 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/float/It_smp_los_float_switch_007.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/float/It_smp_los_float_switch_007.c
@@ -38,7 +38,7 @@ extern "C" {
#endif /* __cpluscplus */
#ifndef LOSCFG_ARCH_FPU_DISABLE
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static UINT32 g_targetCpuid;
static void HwiF01(UINT32 arg)
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_008.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_008.c
index 7bb9ec52..7302772f 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_008.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_008.c
@@ -55,7 +55,7 @@ static UINT32 Testcase(void)
task1.uwStackSize = TASK_STACK_SIZE_TEST;
task1.pcName = "Tsk007A_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_011.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_011.c
index 0fc65c5c..3d985709 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_011.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_011.c
@@ -61,7 +61,7 @@ static UINT32 Testcase(void)
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
/* Wait TaskF01 to start */
while (g_testCount == 0) {
}
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_016.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_016.c
index 4d8d6dad..94549436 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_016.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_016.c
@@ -88,7 +88,7 @@ static UINT32 Testcase(void)
task1.uwResved = LOS_TASK_STATUS_DETACHED;
// 0xffff, initializes the args. this parameter has no special meaning.
task1.auwArgs[0] = 0xffff;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_017.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_017.c
index bc91737a..8adb7c1d 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_017.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_017.c
@@ -51,7 +51,7 @@ static UINT32 Testcase(void)
task1.uwStackSize = TASK_STACK_SIZE_TEST;
task1.pcName = "Tsk017A";
task1.usTaskPrio = 1;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_018.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_018.c
index 26fa787f..7f22abba 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_018.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_018.c
@@ -51,7 +51,7 @@ static UINT32 Testcase(void)
task1.uwStackSize = TASK_STACK_SIZE_TEST;
task1.pcName = "Tsk018A";
task1.usTaskPrio = OS_TASK_PRIORITY_LOWEST;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_025.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_025.c
index 738d30cd..37a3619f 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_025.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_025.c
@@ -56,7 +56,7 @@ static UINT32 Testcase(void)
task1.uwStackSize = TASK_STACK_SIZE_TEST;
task1.pcName = "Tsk025A";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_029.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_029.c
index 1b913a63..87a18286 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_029.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_029.c
@@ -67,7 +67,7 @@ static UINT32 Testcase(void)
task1.uwStackSize = TASK_STACK_SIZE_TEST;
task1.pcName = "Tsk029A";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_031.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_031.c
index 1a444084..5065607e 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_031.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_031.c
@@ -65,7 +65,7 @@ static UINT32 Testcase(void)
task1.uwStackSize = TASK_STACK_SIZE_TEST;
task1.pcName = "Tsk031A";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_033.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_033.c
index 39712122..b4ba7424 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_033.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_033.c
@@ -65,7 +65,7 @@ static UINT32 Testcase(void)
task1.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
task1.pcName = "Tsk033A";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_038.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_038.c
index d7965f31..6df1d299 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_038.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_038.c
@@ -68,7 +68,7 @@ static UINT32 Testcase(void)
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
g_testCount = 0;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_039.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_039.c
index 9ec8fb14..38fbdef6 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_039.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_039.c
@@ -56,7 +56,7 @@ static UINT32 Testcase(void)
task1.pfnTaskEntry = (TSK_ENTRY_FUNC)TaskF01;
task1.uwStackSize = TASK_STACK_SIZE_TEST;
task1.usTaskPrio = TASK_PRIO_TEST_TASK + 1;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_040.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_040.c
index 005d3b83..9b7fcb23 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_040.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_040.c
@@ -51,7 +51,7 @@ static UINT32 Testcase(void)
TSK_INIT_PARAM_S task1 = { 0 };
task1.pfnTaskEntry = (TSK_ENTRY_FUNC)TaskF01;
task1.uwStackSize = TASK_STACK_SIZE_TEST;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
LOS_TaskLock();
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_041.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_041.c
index 02f46c11..a5268b06 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_041.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_041.c
@@ -60,7 +60,7 @@ static UINT32 Testcase(void)
task1.pcName = "Tsk041A";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_042.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_042.c
index 21e5fa0c..9ff64254 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_042.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_042.c
@@ -63,7 +63,7 @@ static UINT32 Testcase(void)
task1.pcName = "Tsk042A";
task1.uwStackSize = TASK_STACK_SIZE_TEST;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_043.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_043.c
index 881b9689..3b9a6f16 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_043.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_043.c
@@ -59,7 +59,7 @@ static UINT32 Testcase(void)
task1.pcName = "Tsk043A";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_047.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_047.c
index 00c35910..bb983c34 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_047.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_047.c
@@ -69,7 +69,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_050.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_050.c
index 3352043d..b02ac19e 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_050.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_050.c
@@ -54,7 +54,7 @@ static void TaskF01(void)
task1.pcName = "Tsk050B";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
@@ -82,7 +82,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_052.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_052.c
index 9e8b5699..fe98cbf9 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_052.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_052.c
@@ -55,7 +55,7 @@ static void TaskF01(void)
// 3, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 3;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ICUNIT_ASSERT_EQUAL_VOID(g_testCount, 0, g_testCount);
@@ -80,7 +80,7 @@ static UINT32 Testcase(void)
task1.pcName = "Tsk052A";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_053.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_053.c
index 710cae51..a1c80e09 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_053.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_053.c
@@ -57,7 +57,7 @@ static void TaskF01(void)
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, HwiF01, 0);
ICUNIT_ASSERT_EQUAL_VOID(ret, LOS_OK, ret);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
@@ -78,7 +78,7 @@ static UINT32 Testcase(void)
task1.pcName = "Tsk053A";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_054.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_054.c
index 09a7c3c0..d746a77d 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_054.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_054.c
@@ -67,7 +67,7 @@ static void TaskF01(void)
task1.pcName = "Tsk054B";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount++;
@@ -78,7 +78,7 @@ static void TaskF01(void)
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, HwiF01, 0);
ICUNIT_ASSERT_EQUAL_VOID(ret, LOS_OK, ret);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
@@ -100,7 +100,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_055.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_055.c
index b4edf7d7..66b9dd72 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_055.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_055.c
@@ -51,7 +51,7 @@ static void TaskF01(void)
task1.pcName = "Tsk055B";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
@@ -80,7 +80,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_056.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_056.c
index 0f453580..ac7823f9 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_056.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_056.c
@@ -59,7 +59,7 @@ static void TaskF01(void)
task1.pcName = "Tsk056B";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
@@ -89,7 +89,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_057.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_057.c
index f38e21ca..7f1451e3 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_057.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_057.c
@@ -76,7 +76,7 @@ static UINT32 Testcase(void)
task1.pcName = "Tsk057A";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_058.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_058.c
index f5684124..0137b11a 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_058.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_058.c
@@ -95,7 +95,7 @@ static UINT32 Testcase(void)
task1.pcName = "Tsk058A";
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_060.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_060.c
index 6673370b..2e0a188f 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_060.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_060.c
@@ -78,7 +78,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_061.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_061.c
index 59a683a0..c0ed2a19 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_061.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_061.c
@@ -60,7 +60,7 @@ static void TaskF02(void)
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, HwiF01, 0);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
@@ -101,7 +101,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
@@ -116,7 +116,7 @@ static UINT32 Testcase(void)
task1.pcName = "Tsk061B";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_063.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_063.c
index 922a2f99..9da5327e 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_063.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_063.c
@@ -81,7 +81,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
@@ -97,7 +97,7 @@ static UINT32 Testcase(void)
task1.pcName = "Tsk063B";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_064.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_064.c
index 2571a845..b82cceeb 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_064.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_064.c
@@ -60,7 +60,7 @@ static void TaskF02(void)
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, HwiF01, 0);
ICUNIT_ASSERT_EQUAL_VOID(ret, LOS_OK, ret);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
@@ -84,7 +84,7 @@ static void TaskF01(void)
task1.pcName = "Tsk064B";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount++;
@@ -110,7 +110,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_065.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_065.c
index ed904307..92623f6a 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_065.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_065.c
@@ -54,7 +54,7 @@ static void TaskF01(void)
task1.pcName = "Tsk065B";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ICUNIT_ASSERT_EQUAL_VOID(g_testCount, 0, g_testCount);
@@ -79,7 +79,7 @@ static UINT32 Testcase(void)
// 3, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 3;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_066.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_066.c
index b5509d4d..b85ecf61 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_066.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_066.c
@@ -63,7 +63,7 @@ static void TaskF01(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ICUNIT_ASSERT_EQUAL_VOID(g_testCount, 0, g_testCount);
@@ -76,7 +76,7 @@ static void TaskF01(void)
task1.pcName = "Tsk066C";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID03, &task1);
@@ -98,7 +98,7 @@ static UINT32 Testcase(void)
// 3, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 3;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_067.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_067.c
index 5d1a7f05..d7b9cf90 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_067.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_067.c
@@ -60,7 +60,7 @@ static void TaskF01(void)
// 3, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 3;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ICUNIT_ASSERT_EQUAL_VOID(g_testCount, 0, g_testCount);
@@ -90,7 +90,7 @@ static UINT32 Testcase(void)
task1.pcName = "Tsk067A";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_068.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_068.c
index 93a1149f..92f726aa 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_068.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_068.c
@@ -59,7 +59,7 @@ static void TaskF01(void)
task1.pcName = "Tsk068B";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ICUNIT_ASSERT_EQUAL_VOID(g_testCount, 0, g_testCount);
@@ -85,7 +85,7 @@ static UINT32 Testcase(void)
// 3, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 3;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_069.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_069.c
index fd08e7ff..d3668b0f 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_069.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_069.c
@@ -56,7 +56,7 @@ static void TaskF01(void)
task1.pcName = "Tsk069B";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ICUNIT_ASSERT_EQUAL_VOID(g_testCount, 0, g_testCount);
@@ -86,7 +86,7 @@ static UINT32 Testcase(void)
// 3, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 3;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_071.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_071.c
index 5d043d0e..963df73a 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_071.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_071.c
@@ -54,7 +54,7 @@ static UINT32 Testcase(void)
task1.pcName = "Tsk071A";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_072.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_072.c
index ae27bf8b..3a72268f 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_072.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_072.c
@@ -54,7 +54,7 @@ static UINT32 Testcase(void)
task1.pcName = "Tsk072A";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_073.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_073.c
index 7e0cb5dd..dee78432 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_073.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_073.c
@@ -94,7 +94,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_074.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_074.c
index e8a003d4..44a86715 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_074.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_074.c
@@ -63,7 +63,7 @@ static UINT32 Testcase(void)
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2; // 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.pcName = "Tsk074A";
task1.uwStackSize = TASK_STACK_SIZE_TEST;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_075.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_075.c
index 9d9a81ba..2ba3c829 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_075.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_075.c
@@ -99,7 +99,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
@@ -117,7 +117,7 @@ static UINT32 Testcase(void)
task1.pfnTaskEntry = (TSK_ENTRY_FUNC)TaskF02;
task1.pcName = "Tsk075B";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_076.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_076.c
index 2074443e..bc193435 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_076.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_076.c
@@ -77,7 +77,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_077.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_077.c
index 0c0dc6ea..5189bb24 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_077.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_077.c
@@ -79,7 +79,7 @@ static UINT32 Testcase(void)
// 3, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 3;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_078.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_078.c
index 1c02aa73..22a88563 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_078.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_078.c
@@ -66,7 +66,7 @@ static UINT32 Testcase(void)
task1.pcName = "Tsk078A";
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_079.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_079.c
index 885f2c15..41d12880 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_079.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_079.c
@@ -65,7 +65,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_080.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_080.c
index b2209d73..43e792c0 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_080.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_080.c
@@ -65,7 +65,7 @@ static UINT32 Testcase(void)
ret = LOS_HwiCreate(HWI_NUM_TEST, hwiPrio, mode, (HWI_PROC_FUNC)HwiF01, (HwiIrqParam *)arg);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_082.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_082.c
index f270941a..ac9b3a88 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_082.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_082.c
@@ -77,7 +77,7 @@ static UINT32 Testcase(void)
LOS_EventWrite(&g_eventCb01, 0x1);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ICUNIT_ASSERT_EQUAL(g_testCount, 2, g_testCount); // 2, assert that g_testCount is equal to this.
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_090.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_090.c
index 3154d945..3a8c9803 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_090.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_090.c
@@ -70,7 +70,7 @@ static UINT32 Testcase(void)
task1.pcName = "Tsk090A";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_093.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_093.c
index 6bcfc350..7cd2591a 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_093.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_093.c
@@ -69,7 +69,7 @@ static UINT32 Testcase(void)
task1.pcName = "Tsk093A";
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_094.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_094.c
index c3712a2b..f3269e4f 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_094.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_094.c
@@ -82,7 +82,7 @@ static UINT32 Testcase(void)
// 0xffff, initializes the args. this parameter has no special meaning.
task1.auwArgs[0] = 0xffff;
task1.processID = LOS_GetCurrProcessID();
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
@@ -104,7 +104,7 @@ static UINT32 Testcase(void)
// 3, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 3;
task1.processID = LOS_GetCurrProcessID();
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
task1.processID = LOS_GetCurrProcessID();
@@ -129,7 +129,7 @@ static UINT32 Testcase(void)
// 4, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 4;
task1.processID = LOS_GetCurrProcessID();
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
task1.processID = LOS_GetCurrProcessID();
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_095.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_095.c
index ffde8962..41ee35b1 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_095.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_095.c
@@ -54,7 +54,7 @@ static UINT32 Testcase(void)
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
task1.processID = LOS_GetCurrProcessID();
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
task1.processID = LOS_GetCurrProcessID();
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_096.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_096.c
index 09be0708..57b5c8a0 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_096.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_096.c
@@ -56,7 +56,7 @@ static void TaskF01(void)
// 3, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 3;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
@@ -81,7 +81,7 @@ static UINT32 Testcase(void)
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = 0;
task1.processID = LOS_GetCurrProcessID();
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
task1.processID = LOS_GetCurrProcessID();
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_098.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_098.c
index 0be50c2c..e8ef4d8f 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_098.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_098.c
@@ -54,7 +54,7 @@ static void TaskF01(void)
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 3;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
task1.processID = LOS_GetCurrProcessID();
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
task1.processID = LOS_GetCurrProcessID();
@@ -87,7 +87,7 @@ static UINT32 Testcase(void)
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
task1.processID = LOS_GetCurrProcessID();
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
task1.processID = LOS_GetCurrProcessID();
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_100.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_100.c
index 6cbc00f2..da22e5b4 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_100.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_100.c
@@ -60,7 +60,7 @@ static UINT32 Testcase(void)
task1.pcName = "Tsk100A";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_102.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_102.c
index b6669305..e395c577 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_102.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_102.c
@@ -59,7 +59,7 @@ static void TaskF01(void)
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, HwiF01, 0);
ICUNIT_ASSERT_EQUAL_VOID(ret, LOS_OK, ret);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
@@ -80,7 +80,7 @@ static UINT32 Testcase(void)
task1.pcName = "Tsk102A";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_103.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_103.c
index 46ac159b..ef91eb9d 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_103.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_103.c
@@ -59,7 +59,7 @@ static void TaskF01(void)
task1.pcName = "Tsk103B";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
@@ -95,7 +95,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_104.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_104.c
index 3d5b1923..844f38f6 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_104.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_104.c
@@ -68,7 +68,7 @@ static void TaskF01(void)
// 3, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 3;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
@@ -98,7 +98,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_106.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_106.c
index ad166138..e3b067d2 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_106.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_106.c
@@ -74,7 +74,7 @@ static void TaskF01(void)
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, HwiF01, 0);
ICUNIT_ASSERT_EQUAL_VOID(ret, LOS_OK, ret);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
@@ -96,7 +96,7 @@ static UINT32 Testcase(void)
task1.pcName = "Tsk106A";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_107.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_107.c
index 6674235d..3b8430bd 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_107.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_107.c
@@ -68,7 +68,7 @@ static void TaskF01(void)
// 3, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 3;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
@@ -99,7 +99,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_108.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_108.c
index 72c0b976..afefcb22 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_108.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_108.c
@@ -67,7 +67,7 @@ static void TaskF01(void)
// 3, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 3;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ICUNIT_GOTO_EQUAL(g_testCount, 0, g_testCount, EXIT);
@@ -102,7 +102,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_109.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_109.c
index 627369e7..981af5ce 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_109.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_109.c
@@ -67,7 +67,7 @@ static void TaskF01(void)
// 3, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 3;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
@@ -98,7 +98,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_110.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_110.c
index bdf1791f..117485d8 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_110.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_110.c
@@ -68,7 +68,7 @@ static void TaskF01(void)
// 3, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 3;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ICUNIT_GOTO_EQUAL(g_testCount, 0, g_testCount, EXIT);
@@ -104,7 +104,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_111.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_111.c
index 5fd53d2c..9036dc02 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_111.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_111.c
@@ -67,7 +67,7 @@ static void TaskF01(void)
task1.pcName = "Tsk111B";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 3; // 3, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
@@ -99,7 +99,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_112.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_112.c
index 62d01f3f..09d6fc9d 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_112.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_112.c
@@ -67,7 +67,7 @@ static void TaskF01(void)
// 4, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 4;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
@@ -105,7 +105,7 @@ static UINT32 Testcase(void)
// 3, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 3;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_113.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_113.c
index bfc87872..70d96b3a 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_113.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_113.c
@@ -67,7 +67,7 @@ static void TaskF01(void)
task1.pcName = "Tsk113B";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ICUNIT_GOTO_EQUAL(g_testCount, 0, g_testCount, EXIT);
@@ -107,7 +107,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_114.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_114.c
index 2eb472f2..414a279c 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_114.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_114.c
@@ -61,7 +61,7 @@ static void TaskF01(void)
ret = LOS_HwiCreate(HWI_NUM_TEST, hwiPrio, mode, (HWI_PROC_FUNC)HwiF01, (HwiIrqParam *)arg);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT1);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
@@ -90,7 +90,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_115.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_115.c
index 2677f918..5cfd8fb8 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_115.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_115.c
@@ -74,7 +74,7 @@ static void TaskF01(void)
// 4, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 4;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
@@ -112,7 +112,7 @@ static UINT32 Testcase(void)
// 3, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 3;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_116.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_116.c
index b1e2806c..7b5fdd2d 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_116.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_116.c
@@ -97,7 +97,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_118.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_118.c
index 85531ef9..7054a2fd 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_118.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_118.c
@@ -85,7 +85,7 @@ static void TaskF01(void)
ret = LOS_HwiCreate(HWI_NUM_TEST, hwiPrio, mode, (HWI_PROC_FUNC)HwiF01, arg);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
@@ -136,7 +136,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
@@ -149,7 +149,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_119.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_119.c
index 467c8d39..908e332e 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_119.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_119.c
@@ -56,7 +56,7 @@ static UINT32 Testcase(void)
task1.pcName = "Task_119";
// 32, Set the priority according to the task purpose
task1.usTaskPrio = 32;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_120.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_120.c
index d1f4a1e4..03b989f1 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_120.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_120.c
@@ -61,7 +61,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_121.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_121.c
index 0e8aef7f..1d569e65 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_121.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_121.c
@@ -56,7 +56,7 @@ static UINT32 Testcase(void)
task1.pcName = "Task_121";
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_122.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_122.c
index 94d36286..e3ccd8b1 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_122.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_122.c
@@ -55,7 +55,7 @@ static void TaskF01(void)
task1.pcName = "Task_122_1";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
@@ -91,7 +91,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_123.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_123.c
index f2636d2c..b7346365 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_123.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_123.c
@@ -54,7 +54,7 @@ static void TaskF01(void)
task1.pcName = "Task_123_1";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
@@ -86,7 +86,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_124.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_124.c
index d51caa7c..79244497 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_124.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_124.c
@@ -58,7 +58,7 @@ static void TaskF01(void)
// 3, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 3;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
@@ -90,7 +90,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_125.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_125.c
index 24b56ca1..28d09aad 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_125.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_125.c
@@ -62,7 +62,7 @@ static void TaskF01(void)
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, (HWI_PROC_FUNC)HwiF01, 0);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
@@ -88,7 +88,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_126.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_126.c
index 030ac91e..46d46126 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_126.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_126.c
@@ -76,7 +76,7 @@ static void TaskF01(void)
task1.pcName = "Task_126_1";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
@@ -85,7 +85,7 @@ static void TaskF01(void)
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, (HWI_PROC_FUNC)HwiF01, 0);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT1);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
@@ -120,7 +120,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_127.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_127.c
index c9ed5a99..e3ea0943 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_127.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_127.c
@@ -51,7 +51,7 @@ static void TaskF01(void)
task1.pcName = "Task_127_1";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
@@ -77,7 +77,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_128.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_128.c
index 04614748..ff52a0b3 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_128.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_128.c
@@ -63,7 +63,7 @@ static void TaskF01(void)
task1.pcName = "Task_128_1";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
@@ -92,7 +92,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_129.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_129.c
index c80a883e..051c06b4 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_129.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_129.c
@@ -52,7 +52,7 @@ static void HwiF01(void)
// 3, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 3;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
TEST_HwiClear(HWI_NUM_TEST);
@@ -79,7 +79,7 @@ static UINT32 Testcase(void)
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, (HWI_PROC_FUNC)HwiF01, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_130.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_130.c
index 1af58128..ab3e7bd3 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_130.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_130.c
@@ -95,7 +95,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
@@ -110,7 +110,7 @@ static UINT32 Testcase(void)
task1.pcName = "Task_130_1";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_131.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_131.c
index 136011b1..7bc428d0 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_131.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_131.c
@@ -68,7 +68,7 @@ static void TaskF02(void)
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, (HWI_PROC_FUNC)HwiF01, 0);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT1);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
@@ -130,7 +130,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
@@ -145,7 +145,7 @@ static UINT32 Testcase(void)
task1.pcName = "Task_131_1";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_133.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_133.c
index a607f4f8..9385e15a 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_133.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_133.c
@@ -58,7 +58,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_134.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_134.c
index ceb015fc..ac30ed74 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_134.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_134.c
@@ -56,7 +56,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK + 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_135.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_135.c
index 03f5ba0c..f95914f3 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_135.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_135.c
@@ -60,7 +60,7 @@ static UINT32 Testcase(void)
task1.pcName = "Tsk138A";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_136.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_136.c
index 78e86856..5a142e34 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_136.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_136.c
@@ -73,7 +73,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
task2.pfnTaskEntry = (TSK_ENTRY_FUNC)TaskF02;
@@ -81,7 +81,7 @@ static UINT32 Testcase(void)
task2.pcName = "Task_136_2";
task2.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task2.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task2.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
for (i = 0; i < IT_TASK_SMP_LOOP; i++) {
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_138.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_138.c
index 74aa61fb..e3410976 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_138.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_138.c
@@ -85,7 +85,7 @@ static void TaskF01(void)
ret = LOS_HwiCreate(HWI_NUM_TEST, hwiPrio, mode, (HWI_PROC_FUNC)HwiF01, (HwiIrqParam *)arg);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
@@ -136,7 +136,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID01, &task1);
@@ -149,7 +149,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_141.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_141.c
index 8e56235a..a41d892a 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_141.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_141.c
@@ -83,7 +83,7 @@ static UINT32 Testcase(void)
task1.uwStackSize = TASK_STACK_SIZE_TEST;
task1.pcName = "TskTstA";
task1.usTaskPrio = TASK_PRIO_TEST_TASK + 1;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_142.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_142.c
index daeb6075..0f3f260c 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_142.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_142.c
@@ -73,7 +73,7 @@ static UINT32 Testcase(void)
ret = LOS_HwiCreate(HWI_NUM_TEST3, hwiPrio, mode, (HWI_PROC_FUNC)ItHwi, arg);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST3, ArchCurrCpuid() + 1); // curret cpu
#endif
float d1 = 100.0f;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_timeslice_002.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_timeslice_002.c
index 9b5b56ef..d055f0cd 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_timeslice_002.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_timeslice_002.c
@@ -84,7 +84,7 @@ static UINT32 Testcase(void)
task.uwStackSize = TASK_STACK_SIZE_TEST * 2;
task.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
@@ -96,7 +96,7 @@ static UINT32 Testcase(void)
task.uwStackSize = TASK_STACK_SIZE_TEST;
task.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_timeslice_003.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_timeslice_003.c
index c8de1cc6..c62a362f 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_timeslice_003.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_timeslice_003.c
@@ -126,7 +126,7 @@ static UINT32 Testcase(void)
task.uwStackSize = TASK_STACK_SIZE_TEST * 2;
task.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
@@ -139,7 +139,7 @@ static UINT32 Testcase(void)
task.uwStackSize = TASK_STACK_SIZE_TEST * 2;
task.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
@@ -151,7 +151,7 @@ static UINT32 Testcase(void)
task.uwStackSize = TASK_STACK_SIZE_TEST;
task.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
diff --git a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_timeslice_004.c b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_timeslice_004.c
index c96e453a..d59e9882 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_timeslice_004.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/full/It_los_task_timeslice_004.c
@@ -131,7 +131,7 @@ static UINT32 Testcase(void)
task.uwStackSize = TASK_STACK_SIZE_TEST * 3;
task.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
@@ -143,7 +143,7 @@ static UINT32 Testcase(void)
task.uwStackSize = TASK_STACK_SIZE_TEST;
task.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
diff --git a/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_049.c b/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_049.c
index b3e8d03a..3742a238 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_049.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_049.c
@@ -83,7 +83,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
diff --git a/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_081.c b/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_081.c
index 359c9aee..d37870f7 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_081.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_081.c
@@ -105,7 +105,7 @@ static UINT32 Testcase(void)
task1.pcName = "Tsk081A";
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_097.c b/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_097.c
index 5b67c366..dee48ee6 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_097.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_097.c
@@ -57,7 +57,7 @@ static void TaskF01(void)
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 3;
task1.uwResved = 0;
task1.processID = LOS_GetCurrProcessID();
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
task1.processID = LOS_GetCurrProcessID();
@@ -87,7 +87,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
task1.processID = -1;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_099.c b/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_099.c
index 5b884572..79459cf6 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_099.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_099.c
@@ -55,7 +55,7 @@ static UINT32 Testcase(void)
// 2, It is used to calculate a priority relative to TASK_PRIO_TEST_TASK.
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 2;
task1.processID = LOS_GetCurrProcessID();
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
task1.processID = LOS_GetCurrProcessID();
diff --git a/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_101.c b/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_101.c
index c84a6869..d16703f0 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_101.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_101.c
@@ -60,7 +60,7 @@ static UINT32 Testcase(void)
task1.pcName = "Tsk101A";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_105.c b/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_105.c
index e186f8ed..55932c80 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_105.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_105.c
@@ -63,7 +63,7 @@ static UINT32 Testcase(void)
task1.pcName = "Tsk105A";
task1.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_timeslice_001.c b/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_timeslice_001.c
index 93515685..bc5ad154 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_timeslice_001.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/smoke/It_los_task_timeslice_001.c
@@ -75,7 +75,7 @@ static UINT32 Testcase(void)
task.uwStackSize = TASK_STACK_SIZE_TEST * 2;
task.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
@@ -87,7 +87,7 @@ static UINT32 Testcase(void)
task.uwStackSize = TASK_STACK_SIZE_TEST;
task.usTaskPrio = TASK_PRIO_TEST_TASK - 1;
task.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
diff --git a/testsuites/kernel/sample/kernel_base/core/task/smp/It_smp_los_task_002.c b/testsuites/kernel/sample/kernel_base/core/task/smp/It_smp_los_task_002.c
index ad1ee4a4..0958e7bc 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/smp/It_smp_los_task_002.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/smp/It_smp_los_task_002.c
@@ -62,7 +62,7 @@ static UINT32 Testcase(void)
LOS_TaskDelay(2); // 2, set delay time.
ret = LOS_TaskDelete(testid);
-#if (LOSCFG_KERNEL_SMP_TASK_SYNC == NO)
+#ifndef LOSCFG_KERNEL_SMP_TASK_SYNC
/* delay and check */
LOS_TaskDelay(10); // 10, set delay time.
#endif
diff --git a/testsuites/kernel/sample/kernel_base/core/task/smp/It_smp_los_task_024.c b/testsuites/kernel/sample/kernel_base/core/task/smp/It_smp_los_task_024.c
index a35fcfc9..d1b38e31 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/smp/It_smp_los_task_024.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/smp/It_smp_los_task_024.c
@@ -76,7 +76,7 @@ static UINT32 Testcase(void)
g_itTestResult = LOS_OK;
LOS_TaskLock();
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
currCpuid = (ArchCurrCpuid() + 1) % LOSCFG_KERNEL_CORE_NUM;
#endif
diff --git a/testsuites/kernel/sample/kernel_base/core/task/smp/It_smp_los_task_025.c b/testsuites/kernel/sample/kernel_base/core/task/smp/It_smp_los_task_025.c
index b0c7cd42..33270a17 100644
--- a/testsuites/kernel/sample/kernel_base/core/task/smp/It_smp_los_task_025.c
+++ b/testsuites/kernel/sample/kernel_base/core/task/smp/It_smp_los_task_025.c
@@ -95,7 +95,7 @@ static UINT32 Testcase(void)
g_itTestResult = LOS_NOK;
LOS_TaskLock();
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
currCpuid = (ArchCurrCpuid() + 1) % LOSCFG_KERNEL_CORE_NUM;
#endif
diff --git a/testsuites/kernel/sample/kernel_base/ipc/event/It_los_event.c b/testsuites/kernel/sample/kernel_base/ipc/event/It_los_event.c
index ee305b7f..949e547f 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/event/It_los_event.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/event/It_los_event.c
@@ -39,7 +39,7 @@ extern "C" {
VOID ItSuiteLosEvent(VOID)
{
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
ItSmpLosEvent001();
ItSmpLosEvent002();
ItSmpLosEvent003();
@@ -107,7 +107,7 @@ VOID ItSuiteLosEvent(VOID)
ItLosEvent023();
ItLosEvent024();
ItLosEvent025();
-#if (LOSCFG_KERNEL_SMP != YES)
+#ifndef LOSCFG_KERNEL_SMP
ItLosEvent026();
#endif
ItLosEvent027();
@@ -117,7 +117,7 @@ VOID ItSuiteLosEvent(VOID)
ItLosEvent033(); // /
ItLosEvent037();
ItLosEvent038();
-#if (LOSCFG_KERNEL_SMP != YES)
+#ifndef LOSCFG_KERNEL_SMP
ItLosEvent039();
#endif
ItLosEvent040();
@@ -134,7 +134,7 @@ VOID ItSuiteLosEvent(VOID)
ItLosEvent017();
ItLosEvent034();
#endif
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, 1);
#endif
}
diff --git a/testsuites/kernel/sample/kernel_base/ipc/event/It_los_event.h b/testsuites/kernel/sample/kernel_base/ipc/event/It_los_event.h
index 61451f0c..26dad0f9 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/event/It_los_event.h
+++ b/testsuites/kernel/sample/kernel_base/ipc/event/It_los_event.h
@@ -151,7 +151,7 @@ extern VOID ItLosEvent017(VOID);
extern VOID ItLosEvent034(VOID);
#endif
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
VOID ItSmpLosEvent001(VOID);
VOID ItSmpLosEvent002(VOID);
VOID ItSmpLosEvent003(VOID);
diff --git a/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_018.c b/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_018.c
index cb6b34b0..9f43e7cb 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_018.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_018.c
@@ -46,7 +46,7 @@ static VOID TaskF02(VOID)
ret = LOS_EventWrite(&g_event, 0x10);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
-#if (LOSCFG_KERNEL_SMP != YES)
+#ifndef LOSCFG_KERNEL_SMP
ICUNIT_GOTO_EQUAL(g_testCount, 4, g_testCount, EXIT); // 4, Here, assert that g_testCount is equal to 4.
#endif
g_testCount++;
diff --git a/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_023.c b/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_023.c
index f08a1c6f..24ffccee 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_023.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_023.c
@@ -61,7 +61,7 @@ static VOID TaskF01(VOID)
ICUNIT_GOTO_EQUAL(ret, g_event.uwEventID, ret, EXIT);
ICUNIT_ASSERT_EQUAL_VOID(ret, 0x11, ret);
-#if (LOSCFG_KERNEL_SMP != YES)
+#ifndef LOSCFG_KERNEL_SMP
ICUNIT_GOTO_EQUAL(g_testCount, 5, g_testCount, EXIT); // 5, Here, assert that g_testCount is equal to 5.
#endif
g_testCount++;
@@ -80,7 +80,7 @@ static VOID TaskF02(VOID)
ICUNIT_GOTO_EQUAL(ret, g_event.uwEventID, ret, EXIT);
ICUNIT_ASSERT_EQUAL_VOID(ret, 0x11, ret);
-#if (LOSCFG_KERNEL_SMP != YES)
+#ifndef LOSCFG_KERNEL_SMP
ICUNIT_GOTO_EQUAL(g_testCount, 6, g_testCount, EXIT); // 6, Here, assert that g_testCount is equal to 6.
#endif
g_testCount++;
@@ -121,7 +121,7 @@ static UINT32 Testcase(VOID)
ret = LOS_HwiCreate(HWI_NUM_TEST, 0, 0, HwiF01, 0);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
diff --git a/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_024.c b/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_024.c
index 988a6d1b..32d754be 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_024.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_024.c
@@ -58,7 +58,7 @@ static UINT32 Testcase(VOID)
ret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, HwiF01, 0);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
diff --git a/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_026.c b/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_026.c
index 73069046..fc30d6a2 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_026.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_026.c
@@ -73,7 +73,7 @@ static UINT32 Testcase(VOID)
task1.uwStackSize = TASK_STACK_SIZE_TEST;
task1.usTaskPrio = TASK_PRIO_TEST - 2; // 2, set new task priority, it is higher than the current task.
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_038.c b/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_038.c
index 6a523f9f..ff269c61 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_038.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_038.c
@@ -116,7 +116,7 @@ static UINT32 Testcase(VOID)
task1.uwStackSize = TASK_STACK_SIZE_TEST;
task1.usTaskPrio = TASK_PRIO_TEST - 2; // 2, set new task priority, it is higher than the current task.
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
@@ -128,7 +128,7 @@ static UINT32 Testcase(VOID)
task1.uwStackSize = TASK_STACK_SIZE_TEST;
task1.usTaskPrio = TASK_PRIO_TEST - 1;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
@@ -139,7 +139,7 @@ static UINT32 Testcase(VOID)
ret = LOS_HwiCreate(HWI_NUM_TEST, 0, 0, HwiF01, 0);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT1);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
diff --git a/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_039.c b/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_039.c
index 4afc4dcf..7ded8636 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_039.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/event/full/It_los_event_039.c
@@ -65,7 +65,7 @@ static UINT32 Testcase(VOID)
task1.uwStackSize = TASK_STACK_SIZE_TEST;
task1.usTaskPrio = TASK_PRIO_TEST - 2; // 2, set new task priority, it is higher than the current task.
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/ipc/event/smoke/It_los_event_036.c b/testsuites/kernel/sample/kernel_base/ipc/event/smoke/It_los_event_036.c
index a5edd54a..7428ff16 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/event/smoke/It_los_event_036.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/event/smoke/It_los_event_036.c
@@ -66,7 +66,7 @@ static UINT32 Testcase(VOID)
task1.uwStackSize = TASK_STACK_SIZE_TEST;
task1.usTaskPrio = TASK_PRIO_TEST - 2; // 2, set new task priority, it is higher than the current task.
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
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 ef39eb66..9c56de16 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
@@ -37,7 +37,7 @@ extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static UINT32 g_ret1, g_ret2, g_ret3;
static UINT32 g_szId[3] = {0};
diff --git a/testsuites/kernel/sample/kernel_base/ipc/mux/It_los_mux.c b/testsuites/kernel/sample/kernel_base/ipc/mux/It_los_mux.c
index c68b18f3..b0cb2a26 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/mux/It_los_mux.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/mux/It_los_mux.c
@@ -107,7 +107,7 @@ VOID ItSuiteLosMux(void)
ItLosMux043();
#endif
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
ItSmpLosMux001();
ItSmpLosMux002();
ItSmpLosMux003();
@@ -143,7 +143,7 @@ VOID ItSuiteLosMux(void)
ItSmpLosMux2029();
#endif
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, 1);
HalIrqSetAffinity(HWI_NUM_TEST1, 1);
#endif
diff --git a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_013.c b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_013.c
index 76e1167e..d7b003b0 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_013.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_013.c
@@ -72,11 +72,11 @@ static UINT32 Testcase(VOID)
ret = LOS_HwiCreate(HWI_NUM_TEST, 0, 0, (HWI_PROC_FUNC)HwiF01, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
TestHwiTrigger(HWI_NUM_TEST);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
TestBusyTaskDelay(5); // 5, delay for Timing control.
#endif
ICUNIT_ASSERT_EQUAL(g_testCount, 1, g_testCount);
diff --git a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_016.c b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_016.c
index 3db8a392..cd2ab6e1 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_016.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_016.c
@@ -65,12 +65,12 @@ static UINT32 Testcase(VOID)
ret = LOS_HwiCreate(HWI_NUM_TEST, 0, 0, (HWI_PROC_FUNC)HwiF01, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
TestHwiTrigger(HWI_NUM_TEST);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
TestBusyTaskDelay(10); // 10, delay for Timing control.
#endif
diff --git a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_017.c b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_017.c
index 27ad8361..c98ff4e9 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_017.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_017.c
@@ -64,7 +64,7 @@ static UINT32 Testcase(VOID)
ret = LOS_HwiCreate(HWI_NUM_TEST, 0, 0, (HWI_PROC_FUNC)HwiF01, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
TestHwiTrigger(HWI_NUM_TEST);
diff --git a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_020.c b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_020.c
index 97230ac6..4da64155 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_020.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_020.c
@@ -78,7 +78,7 @@ static UINT32 Testcase(VOID)
ret = LOS_HwiCreate(HWI_NUM_TEST0, 0, 0, (HWI_PROC_FUNC)HwiF02, 0);
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
HalIrqSetAffinity(HWI_NUM_TEST0, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
diff --git a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_021.c b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_021.c
index 0c7873c1..b91b06af 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_021.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_021.c
@@ -69,7 +69,7 @@ VOID TaskF02(void)
task1.uwStackSize = TASK_STACK_SIZE_TEST;
task1.usTaskPrio = TASK_PRIO_TEST - 3; // 3, set reasonable priority.
task1.uwResved = 0;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
@@ -101,7 +101,7 @@ static UINT32 Testcase(VOID)
task.pcName = "LosMB2_1";
task.uwStackSize = 0x900;
task.uwResved = 0;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID01, &task);
diff --git a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_026.c b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_026.c
index 5220c6fc..edb52dfe 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_026.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_026.c
@@ -117,7 +117,7 @@ static VOID TaskAFunc(VOID)
task1.pcName = "TaskB";
task1.uwStackSize = TASK_STACK_SIZE_TEST;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
@@ -135,7 +135,7 @@ static VOID TaskAFunc(VOID)
task2.pcName = "TaskC";
task2.uwStackSize = TASK_STACK_SIZE_TEST;
task2.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task2.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID03, &task2);
@@ -152,7 +152,7 @@ static VOID TaskAFunc(VOID)
task3.pcName = "TaskD";
task3.uwStackSize = TASK_STACK_SIZE_TEST;
task3.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task3.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID04, &task3);
@@ -210,7 +210,7 @@ static UINT32 Testcase(VOID)
task.pcName = "TaskA";
task.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
task.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID01, &task);
diff --git a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_027.c b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_027.c
index bf957e9a..01db9295 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_027.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_027.c
@@ -111,7 +111,7 @@ static VOID TaskA1Func(VOID)
task1.pcName = "TaskB";
task1.uwStackSize = TASK_STACK_SIZE_TEST;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
@@ -122,7 +122,7 @@ static VOID TaskA1Func(VOID)
task2.pcName = "TaskC";
task2.uwStackSize = TASK_STACK_SIZE_TEST;
task2.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task2.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID03, &task2);
@@ -133,7 +133,7 @@ static VOID TaskA1Func(VOID)
task3.pcName = "TaskD";
task3.uwStackSize = TASK_STACK_SIZE_TEST;
task3.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task3.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID04, &task3);
@@ -168,7 +168,7 @@ static UINT32 Testcase(void)
task.pcName = "TaskA";
task.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
task.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID01, &task);
diff --git a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_028.c b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_028.c
index de9234b4..6e367d5a 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_028.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_028.c
@@ -103,7 +103,7 @@ static VOID TaskA2Func(VOID)
task1.pcName = "TaskB";
task1.uwStackSize = TASK_STACK_SIZE_TEST;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
@@ -115,7 +115,7 @@ static VOID TaskA2Func(VOID)
task2.pcName = "TaskC";
task2.uwStackSize = TASK_STACK_SIZE_TEST;
task2.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task2.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID03, &task2);
@@ -127,7 +127,7 @@ static VOID TaskA2Func(VOID)
task3.pcName = "TaskD";
task3.uwStackSize = TASK_STACK_SIZE_TEST;
task3.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task3.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID04, &task3);
@@ -164,7 +164,7 @@ static UINT32 Testcase(VOID)
task.pcName = "TaskA";
task.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
task.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID01, &task);
diff --git a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_029.c b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_029.c
index cdb90189..a46e0e36 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_029.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_029.c
@@ -75,7 +75,7 @@ static VOID TaskC3Func(VOID)
task1.pcName = "TaskD";
task1.uwStackSize = TASK_STACK_SIZE_TEST;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID04, &task1);
@@ -130,7 +130,7 @@ static VOID TaskA3Func(VOID)
task1.pcName = "TaskB";
task1.uwStackSize = TASK_STACK_SIZE_TEST;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
@@ -141,7 +141,7 @@ static VOID TaskA3Func(VOID)
task2.pcName = "TaskC";
task2.uwStackSize = TASK_STACK_SIZE_TEST;
task2.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task2.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID03, &task2);
@@ -178,7 +178,7 @@ static UINT32 Testcase(VOID)
task.pcName = "TaskA";
task.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
task.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID01, &task);
diff --git a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_031.c b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_031.c
index f0afad92..dde87d11 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_031.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_031.c
@@ -119,7 +119,7 @@ static VOID TaskA5Func(VOID)
task1.pcName = "TaskB";
task1.uwStackSize = TASK_STACK_SIZE_TEST;
task1.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID02, &task1);
@@ -130,7 +130,7 @@ static VOID TaskA5Func(VOID)
task2.pcName = "TaskC";
task2.uwStackSize = TASK_STACK_SIZE_TEST;
task2.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task2.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID03, &task2);
@@ -141,7 +141,7 @@ static VOID TaskA5Func(VOID)
task3.pcName = "TaskD";
task3.uwStackSize = TASK_STACK_SIZE_TEST;
task3.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task3.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID04, &task3);
@@ -182,7 +182,7 @@ static UINT32 Testcase(VOID)
task.pcName = "TaskA";
task.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
task.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testTaskID01, &task);
diff --git a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_035.c b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_035.c
index b9c75822..db1e4f62 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_035.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_035.c
@@ -100,7 +100,7 @@ static VOID TaskMisc10Func(VOID)
task1.pcName = "TaskService_3";
task1.uwStackSize = LOS_TASK_MIN_STACK_SIZE;
task1.uwResved = 0;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
@@ -134,7 +134,7 @@ static UINT32 Testcase(VOID)
task.pcName = "TaskMisc_10";
task.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
task.uwResved = 0;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
@@ -146,7 +146,7 @@ static UINT32 Testcase(VOID)
task.pcName = "TaskFe_2";
task.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
task.uwResved = 0;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
diff --git a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_036.c b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_036.c
index dd41f227..a050575e 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_036.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_036.c
@@ -87,7 +87,7 @@ static VOID TaskMisc10Func(VOID)
task1.pcName = "TaskService_5";
task1.uwStackSize = LOS_TASK_MIN_STACK_SIZE;
task1.uwResved = 0;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
@@ -118,7 +118,7 @@ static UINT32 Testcase(VOID)
task.pcName = "TaskMisc_10";
task.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
task.uwResved = 0;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
@@ -132,7 +132,7 @@ static UINT32 Testcase(VOID)
task.pcName = "TaskFe_4";
task.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
task.uwResved = 0;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
diff --git a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_037.c b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_037.c
index 046a06fc..e0cf203b 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_037.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_037.c
@@ -95,7 +95,7 @@ static UINT32 Testcase(VOID)
task.pcName = "TaskMisc_10";
task.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
task.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
@@ -107,7 +107,7 @@ static UINT32 Testcase(VOID)
task.pcName = "TaskFe_4";
task.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
task.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
diff --git a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_038.c b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_038.c
index 8ca4c571..a4560186 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_038.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_038.c
@@ -89,7 +89,7 @@ static UINT32 Testcase(VOID)
task.pcName = "TaskMisc_10";
task.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
task.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
@@ -101,7 +101,7 @@ static UINT32 Testcase(VOID)
task.pcName = "TaskFe_4";
task.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
task.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
diff --git a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_039.c b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_039.c
index 854dc3ff..63d13309 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_039.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_039.c
@@ -106,7 +106,7 @@ static UINT32 Testcase(VOID)
task.pcName = "TaskMisc_10";
task.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
task.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
@@ -121,7 +121,7 @@ static UINT32 Testcase(VOID)
task.pcName = "TaskFe_4";
task.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
task.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
diff --git a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_040.c b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_040.c
index 1a0523bd..e362c7fe 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_040.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_040.c
@@ -199,7 +199,7 @@ static UINT32 Testcase(VOID)
task.pcName = "TaskMisc_10";
task.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
task.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
@@ -214,7 +214,7 @@ static UINT32 Testcase(VOID)
task.pcName = "TaskFe_9";
task.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
task.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
@@ -229,7 +229,7 @@ static UINT32 Testcase(VOID)
task.pcName = "TaskFe_8";
task.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
task.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
@@ -244,7 +244,7 @@ static UINT32 Testcase(VOID)
task.pcName = "TaskFe_7";
task.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
task.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
diff --git a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_041.c b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_041.c
index a0b9fdf8..4fb84b90 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_041.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_041.c
@@ -81,7 +81,7 @@ static UINT32 Testcase(VOID)
taskParam.pcName = "TaskMisc_10";
taskParam.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
taskParam.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
taskParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
diff --git a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_042.c b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_042.c
index 59ecf212..f0cdfc3d 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_042.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_042.c
@@ -99,7 +99,7 @@ static UINT32 Testcase(VOID)
taskParam.pcName = "TaskMisc_10";
taskParam.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
taskParam.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
taskParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
@@ -115,7 +115,7 @@ static UINT32 Testcase(VOID)
taskParam.pcName = "TaskFe_4";
taskParam.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
taskParam.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
taskParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
diff --git a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_043.c b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_043.c
index 0aa758fb..41324aef 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_043.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/mux/full/It_los_mutex_043.c
@@ -120,7 +120,7 @@ static UINT32 Testcase(VOID)
taskParam.pcName = "TaskMisc_10";
taskParam.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
taskParam.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
taskParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
@@ -136,7 +136,7 @@ static UINT32 Testcase(VOID)
taskParam.pcName = "TaskFe_4";
taskParam.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
taskParam.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
taskParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
diff --git a/testsuites/kernel/sample/kernel_base/ipc/queue/It_los_queue.c b/testsuites/kernel/sample/kernel_base/ipc/queue/It_los_queue.c
index 2a7816a1..a1dd0a3a 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/queue/It_los_queue.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/queue/It_los_queue.c
@@ -40,7 +40,7 @@ extern "C" {
VOID ItSuiteLosQueue(VOID)
{
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
ItSmpLosQueue001();
ItSmpLosQueue002();
ItSmpLosQueue003();
@@ -101,7 +101,7 @@ VOID ItSuiteLosQueue(VOID)
ItLosQueue018();
ItLosQueue019();
ItLosQueue020();
-#if (LOSCFG_KERNEL_SMP != YES)
+#ifndef LOSCFG_KERNEL_SMP
ItLosQueue021();
#endif
ItLosQueue022();
@@ -228,7 +228,7 @@ VOID ItSuiteLosQueue(VOID)
ItLosQueueHead042();
#endif
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, 1);
#endif
}
diff --git a/testsuites/kernel/sample/kernel_base/ipc/queue/It_los_queue.h b/testsuites/kernel/sample/kernel_base/ipc/queue/It_los_queue.h
index fb0b30b6..0309563c 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/queue/It_los_queue.h
+++ b/testsuites/kernel/sample/kernel_base/ipc/queue/It_los_queue.h
@@ -256,7 +256,7 @@ VOID ItLosQueueDebug001(void);
#endif
#endif
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
VOID ItSmpLosQueue001(VOID);
VOID ItSmpLosQueue002(VOID);
VOID ItSmpLosQueue003(VOID);
diff --git a/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_044.c b/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_044.c
index 3ceae8d8..f47b3586 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_044.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_044.c
@@ -70,7 +70,7 @@ static UINT32 Testcase(VOID)
ret = TEST_HwiCreate(HWI_NUM_TEST, 1, 0, HwiF01, 0);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
diff --git a/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_045.c b/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_045.c
index e11fcd6f..e57f3ec8 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_045.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_045.c
@@ -64,7 +64,7 @@ static UINT32 Testcase(VOID)
ret = TEST_HwiCreate(HWI_NUM_TEST, 1, 0, HwiF01, 0);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
diff --git a/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_046.c b/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_046.c
index 24336641..19bca4a7 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_046.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_046.c
@@ -83,7 +83,7 @@ static UINT32 Testcase(VOID)
ret = TEST_HwiCreate(HWI_NUM_TEST3, 1, 0, HwiF02, 0);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
diff --git a/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_047.c b/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_047.c
index 3fb31a6c..f336392b 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_047.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_047.c
@@ -95,7 +95,7 @@ static UINT32 Testcase(VOID)
ret = TEST_HwiCreate(HWI_NUM_TEST, 1, 0, HwiF01, 0);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
diff --git a/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_048.c b/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_048.c
index 99f6dd66..3847f03f 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_048.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_048.c
@@ -88,7 +88,7 @@ static UINT32 Testcase(VOID)
ret = TEST_HwiCreate(HWI_NUM_TEST, 1, 0, HwiF01, 0);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
diff --git a/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_050.c b/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_050.c
index f1d4a9f6..205ab668 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_050.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_050.c
@@ -68,7 +68,7 @@ static UINT32 Testcase(VOID)
ret = TEST_HwiCreate(HWI_NUM_TEST, 1, 0, HwiF01, 0);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
diff --git a/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_108.c b/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_108.c
index 9a2d44b2..48e42202 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_108.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_108.c
@@ -75,7 +75,7 @@ static UINT32 Testcase(VOID)
ret = TEST_HwiCreate(HWI_NUM_TEST, 1, 0, HwiF01, 0);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
diff --git a/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_111.c b/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_111.c
index 72e22d82..84ed0f2a 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_111.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/queue/full/It_los_queue_111.c
@@ -77,7 +77,7 @@ static UINT32 Testcase(VOID)
ret = TEST_HwiCreate(HWI_NUM_TEST, 1, 0, HwiF01, 0);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
diff --git a/testsuites/kernel/sample/kernel_base/ipc/sem/It_los_sem.c b/testsuites/kernel/sample/kernel_base/ipc/sem/It_los_sem.c
index 4a07e548..08468c7d 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/sem/It_los_sem.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/sem/It_los_sem.c
@@ -39,7 +39,7 @@ extern "C" {
VOID ItSuiteLosSem(void)
{
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
/* fixed */
ItSmpLosSem008();
ItSmpLosSem022();
@@ -114,7 +114,7 @@ VOID ItSuiteLosSem(void)
ItLosSem036();
ItLosSem037();
ItLosSem038();
-#if (LOSCFG_KERNEL_SMP_TASK_SYNC != YES)
+#ifndef LOSCFG_KERNEL_SMP_TASK_SYNC
// LOSCFG_KERNEL_SMP_TASK_SYNC is opened ,create task success is depend on created semaphore successed;
ItLosSem039();
ItLosSem040();
@@ -134,7 +134,7 @@ VOID ItSuiteLosSem(void)
ItLosSem024();
ItLosSem030();
ItLosSem032();
-#if (LOSCFG_KERNEL_SMP != YES)
+#ifndef LOSCFG_KERNEL_SMP
ItLosSem033();
#endif
LltLosSem001();
@@ -153,7 +153,7 @@ VOID ItSuiteLosSem(void)
#endif
#endif
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, 1);
#endif
}
diff --git a/testsuites/kernel/sample/kernel_base/ipc/sem/It_los_sem.h b/testsuites/kernel/sample/kernel_base/ipc/sem/It_los_sem.h
index 0da88acf..62368917 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/sem/It_los_sem.h
+++ b/testsuites/kernel/sample/kernel_base/ipc/sem/It_los_sem.h
@@ -102,7 +102,7 @@ VOID ItLosSem043(void);
VOID ItLosSem044(void);
#endif
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
VOID ItSmpLosSem001(VOID);
VOID ItSmpLosSem002(VOID);
VOID ItSmpLosSem003(VOID);
diff --git a/testsuites/kernel/sample/kernel_base/ipc/sem/full/It_los_sem_020.c b/testsuites/kernel/sample/kernel_base/ipc/sem/full/It_los_sem_020.c
index be911426..47bb469c 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/sem/full/It_los_sem_020.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/sem/full/It_los_sem_020.c
@@ -59,7 +59,7 @@ static UINT32 Testcase(VOID)
task.uwStackSize = TASK_STACK_SIZE_TEST;
task.usTaskPrio = TASK_PRIO_TEST - 1;
task.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_testCount = 0;
diff --git a/testsuites/kernel/sample/kernel_base/ipc/sem/full/It_los_sem_022.c b/testsuites/kernel/sample/kernel_base/ipc/sem/full/It_los_sem_022.c
index db7ae18d..56ffb69d 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/sem/full/It_los_sem_022.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/sem/full/It_los_sem_022.c
@@ -60,12 +60,12 @@ static VOID TaskF02(void)
LOS_TaskLock();
ret = LOS_SemPost(g_semID);
ICUNIT_TRACK_EQUAL(ret, LOS_OK, ret);
-#if (LOSCFG_KERNEL_SMP != YES)
+#ifndef LOSCFG_KERNEL_SMP
ICUNIT_TRACK_EQUAL(g_testCount, 1, g_testCount);
#endif
LOS_TaskUnlock();
-#if (LOSCFG_KERNEL_SMP != YES)
+#ifndef LOSCFG_KERNEL_SMP
ICUNIT_TRACK_EQUAL(g_testCount, 1, g_testCount);
#endif
g_testCount++;
diff --git a/testsuites/kernel/sample/kernel_base/ipc/sem/full/It_los_sem_023.c b/testsuites/kernel/sample/kernel_base/ipc/sem/full/It_los_sem_023.c
index 4eb0ab8c..263c6c41 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/sem/full/It_los_sem_023.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/sem/full/It_los_sem_023.c
@@ -88,7 +88,7 @@ static UINT32 Testcase(VOID)
TEST_HwiDelete(HWI_NUM_TEST);
ret = TEST_HwiCreate(HWI_NUM_TEST, 0, 0, HwiF01, 0);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT2);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
diff --git a/testsuites/kernel/sample/kernel_base/ipc/sem/full/It_los_sem_026.c b/testsuites/kernel/sample/kernel_base/ipc/sem/full/It_los_sem_026.c
index 5195b921..65132b95 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/sem/full/It_los_sem_026.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/sem/full/It_los_sem_026.c
@@ -44,7 +44,7 @@ static VOID TaskF02(void)
g_testCount++;
ret = LOS_SemPend(g_semID, LOS_WAIT_FOREVER);
ICUNIT_ASSERT_EQUAL_VOID(ret, LOS_OK, ret);
-#if (LOSCFG_KERNEL_SMP != YES)
+#ifndef LOSCFG_KERNEL_SMP
ICUNIT_TRACK_EQUAL(g_testCount, 2, g_testCount); // 2, Here, assert that g_testCount is equal to
#endif
g_testCount++;
@@ -61,7 +61,7 @@ static VOID TaskF01(void)
ret = LOS_SemPend(g_semID, LOS_WAIT_FOREVER);
ICUNIT_ASSERT_EQUAL_VOID(ret, LOS_OK, ret);
-#if (LOSCFG_KERNEL_SMP != YES)
+#ifndef LOSCFG_KERNEL_SMP
ICUNIT_TRACK_EQUAL(g_testCount, 3, g_testCount); // 3, Here, assert that g_testCount is equal to
#endif
g_testCount++;
diff --git a/testsuites/kernel/sample/kernel_base/ipc/sem/smp/It_smp_los_sem_030.c b/testsuites/kernel/sample/kernel_base/ipc/sem/smp/It_smp_los_sem_030.c
index 742a1042..fdc8155b 100644
--- a/testsuites/kernel/sample/kernel_base/ipc/sem/smp/It_smp_los_sem_030.c
+++ b/testsuites/kernel/sample/kernel_base/ipc/sem/smp/It_smp_los_sem_030.c
@@ -38,7 +38,7 @@ extern "C" {
#endif /* __cpluscplus */
#endif /* __cpluscplus */
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
static UINT32 g_ret1, g_ret2, g_ret3;
static UINT32 g_szId[3] = {0};
diff --git a/testsuites/kernel/sample/kernel_extend/cpup/It_extend_cpup.c b/testsuites/kernel/sample/kernel_extend/cpup/It_extend_cpup.c
index f4217d4e..fc348ff5 100644
--- a/testsuites/kernel/sample/kernel_extend/cpup/It_extend_cpup.c
+++ b/testsuites/kernel/sample/kernel_extend/cpup/It_extend_cpup.c
@@ -99,7 +99,7 @@ VOID ItSuiteExtendCpup(VOID)
ItExtendCpup010();
#endif
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
ItSmpExtendCpup001();
ItSmpExtendCpup002();
#ifdef LOSCFG_CPUP_INCLUDE_IRQ
diff --git a/testsuites/kernel/sample/kernel_extend/cpup/It_extend_cpup.h b/testsuites/kernel/sample/kernel_extend/cpup/It_extend_cpup.h
index 7e54b537..7a4d8eea 100644
--- a/testsuites/kernel/sample/kernel_extend/cpup/It_extend_cpup.h
+++ b/testsuites/kernel/sample/kernel_extend/cpup/It_extend_cpup.h
@@ -116,7 +116,7 @@ VOID ItExtendCpup009(VOID);
VOID ItExtendCpup010(VOID);
#endif
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
VOID ItSmpExtendCpup001(VOID);
VOID ItSmpExtendCpup002(VOID);
#ifdef LOSCFG_CPUP_INCLUDE_IRQ
diff --git a/testsuites/kernel/sample/kernel_extend/cpup/full/It_extend_cpup_004.c b/testsuites/kernel/sample/kernel_extend/cpup/full/It_extend_cpup_004.c
index 98cb5671..2643a713 100644
--- a/testsuites/kernel/sample/kernel_extend/cpup/full/It_extend_cpup_004.c
+++ b/testsuites/kernel/sample/kernel_extend/cpup/full/It_extend_cpup_004.c
@@ -70,7 +70,7 @@ static UINT32 TaskF01(VOID)
task1.pcName = "TestCpupTsk2";
task1.usTaskPrio = TASK_PRIO_TEST - 1; // 1, used to calculate the task priority.
task1.uwResved = TASK_STATUS_UNDETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ICUNIT_ASSERT_EQUAL(g_cpupTestCount, 0, g_cpupTestCount);
@@ -104,7 +104,7 @@ static UINT32 Testcase(VOID)
task1.pcName = "TestCpupTsk1";
task1.usTaskPrio = TASK_PRIO_TEST - 2; // 2, used to calculate the task priority.
task1.uwResved = TASK_STATUS_UNDETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_cpupTestCount = 0;
diff --git a/testsuites/kernel/sample/kernel_extend/cpup/full/It_extend_cpup_005.c b/testsuites/kernel/sample/kernel_extend/cpup/full/It_extend_cpup_005.c
index b47ac536..2e80bad8 100644
--- a/testsuites/kernel/sample/kernel_extend/cpup/full/It_extend_cpup_005.c
+++ b/testsuites/kernel/sample/kernel_extend/cpup/full/It_extend_cpup_005.c
@@ -77,7 +77,7 @@ static UINT32 Testcase(VOID)
task1.pcName = "TskTst1";
task1.usTaskPrio = TASK_PRIO_TEST - 1; // 1, used to calculate the task priority.
task1.uwResved = TASK_STATUS_UNDETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_cpupTestCount = 0;
diff --git a/testsuites/kernel/sample/kernel_extend/cpup/full/It_extend_cpup_006.c b/testsuites/kernel/sample/kernel_extend/cpup/full/It_extend_cpup_006.c
index e90de96d..152f2e29 100644
--- a/testsuites/kernel/sample/kernel_extend/cpup/full/It_extend_cpup_006.c
+++ b/testsuites/kernel/sample/kernel_extend/cpup/full/It_extend_cpup_006.c
@@ -71,7 +71,7 @@ static VOID TaskF01(VOID)
task1.pcName = "TskTst2";
task1.usTaskPrio = TASK_PRIO_TEST - 1; // 1, used to calculate the task priority.
task1.uwResved = TASK_STATUS_UNDETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ICUNIT_ASSERT_EQUAL_VOID(g_cpupTestCount, 0, g_cpupTestCount);
@@ -114,7 +114,7 @@ static UINT32 Testcase(VOID)
task1.pcName = "TskTst1";
task1.usTaskPrio = TASK_PRIO_TEST - 2; // 2, used to calculate the task priority.
task1.uwResved = TASK_STATUS_UNDETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_cpupTestCount = 0;
diff --git a/testsuites/kernel/sample/kernel_extend/cpup/full/It_extend_cpup_008.c b/testsuites/kernel/sample/kernel_extend/cpup/full/It_extend_cpup_008.c
index 86e9e792..45188fd0 100644
--- a/testsuites/kernel/sample/kernel_extend/cpup/full/It_extend_cpup_008.c
+++ b/testsuites/kernel/sample/kernel_extend/cpup/full/It_extend_cpup_008.c
@@ -72,7 +72,7 @@ static UINT32 Testcase(VOID)
task1.pcName = "TestCpupTsk1";
task1.usTaskPrio = TASK_PRIO_TEST - 2; // 2, used to calculate the task priority.
task1.uwResved = TASK_STATUS_UNDETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
task1.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
g_cpupTestCount = 0;
diff --git a/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_001.c b/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_001.c
index d72a879b..5efd147e 100644
--- a/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_001.c
+++ b/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_001.c
@@ -76,7 +76,7 @@ static UINT32 Testcase(VOID)
taskInitParam.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
taskInitParam.pcName = "SmpCpup001_task01";
taskInitParam.usTaskPrio = TASK_PRIO_TEST - 2; // 2, used to calculate the task priority.
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
/* make sure that created test task is definitely on another core */
UINT32 currCpuid = (ArchCurrCpuid() + 1) % LOSCFG_KERNEL_CORE_NUM;
taskInitParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(currCpuid);
@@ -89,7 +89,7 @@ static UINT32 Testcase(VOID)
taskInitParam.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
taskInitParam.pcName = "SmpCpup001_task02";
taskInitParam.usTaskPrio = TASK_PRIO_TEST - 1; // 1, used to calculate the task priority.
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
taskInitParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testSmpCpupTaskID02, &taskInitParam);
diff --git a/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_002.c b/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_002.c
index a05abf00..be0802cc 100644
--- a/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_002.c
+++ b/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_002.c
@@ -68,7 +68,7 @@ static UINT32 Testcase(VOID)
taskInitParam.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
taskInitParam.pcName = "SmpCpup002_task01";
taskInitParam.usTaskPrio = TASK_PRIO_TEST - 1; // 1, used to calculate the task priority.
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
taskInitParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testSmpCpupTaskID01, &taskInitParam);
diff --git a/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_003.c b/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_003.c
index 4b476b9a..c3649397 100644
--- a/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_003.c
+++ b/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_003.c
@@ -99,7 +99,7 @@ static UINT32 Testcase(VOID)
taskInitParam.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
taskInitParam.pcName = "SmpCpup003_task01";
taskInitParam.usTaskPrio = TASK_PRIO_TEST - 2; // 2, used to calculate the task priority.
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
/* make sure that created test task is definitely on another core */
UINT32 currCpuid = (ArchCurrCpuid() + 1) % LOSCFG_KERNEL_CORE_NUM;
taskInitParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(currCpuid);
@@ -112,7 +112,7 @@ static UINT32 Testcase(VOID)
taskInitParam.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
taskInitParam.pcName = "SmpCpup003_task02";
taskInitParam.usTaskPrio = TASK_PRIO_TEST - 1; // 1, used to calculate the task priority.
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
taskInitParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testSmpCpupTaskID02, &taskInitParam);
diff --git a/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_004.c b/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_004.c
index 1fecac72..853a0643 100644
--- a/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_004.c
+++ b/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_004.c
@@ -119,7 +119,7 @@ static UINT32 Testcase(VOID)
taskInitParam.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
taskInitParam.pcName = "SmpCpup004_task01";
taskInitParam.usTaskPrio = TASK_PRIO_TEST - 2; // 2, used to calculate the task priority.
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
/* make sure that created test task is definitely on another core */
UINT32 currCpuid = (ArchCurrCpuid() + 1) % LOSCFG_KERNEL_CORE_NUM;
taskInitParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(currCpuid);
@@ -132,7 +132,7 @@ static UINT32 Testcase(VOID)
taskInitParam.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
taskInitParam.pcName = "SmpCpup004_task02";
taskInitParam.usTaskPrio = TASK_PRIO_TEST - 1; // 1, used to calculate the task priority.
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
taskInitParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testSmpCpupTaskID02, &taskInitParam);
diff --git a/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_005.c b/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_005.c
index 6b247384..72d12677 100644
--- a/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_005.c
+++ b/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_005.c
@@ -68,7 +68,7 @@ static void Task01(void)
taskInitParam.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
taskInitParam.pcName = "SmpCpup005_task03";
taskInitParam.usTaskPrio = TASK_PRIO_TEST - 2; // 2, used to calculate the task priority.
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
taskInitParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testSmpCpupTaskID03, &taskInitParam);
@@ -79,7 +79,7 @@ static void Task01(void)
taskInitParam.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
taskInitParam.pcName = "SmpCpup005_task04";
taskInitParam.usTaskPrio = TASK_PRIO_TEST - 2; // 2, used to calculate the task priority.
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
taskInitParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testSmpCpupTaskID04, &taskInitParam);
@@ -142,7 +142,7 @@ static UINT32 Testcase(VOID)
taskInitParam.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
taskInitParam.pcName = "SmpCpup005_task01";
taskInitParam.usTaskPrio = TASK_PRIO_TEST - 2; // 2, used to calculate the task priority.
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
/* make sure that created test task is definitely on another core */
UINT32 currCpuid = (ArchCurrCpuid() + 1) % LOSCFG_KERNEL_CORE_NUM;
taskInitParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(currCpuid);
@@ -155,7 +155,7 @@ static UINT32 Testcase(VOID)
taskInitParam.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
taskInitParam.pcName = "SmpCpup005_task02";
taskInitParam.usTaskPrio = TASK_PRIO_TEST - 1; // 1, used to calculate the task priority.
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
taskInitParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testSmpCpupTaskID02, &taskInitParam);
diff --git a/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_007.c b/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_007.c
index 6f596788..4b401738 100644
--- a/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_007.c
+++ b/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_007.c
@@ -73,7 +73,7 @@ static UINT32 Testcase(VOID)
taskInitParam.pcName = "SmpCpup007_task01";
taskInitParam.usTaskPrio = TASK_PRIO_TEST - 2; // 2, used to calculate the task priority.
taskInitParam.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
/* make sure that created test task is definitely on another core */
UINT32 currCpuid = (ArchCurrCpuid() + 1) % LOSCFG_KERNEL_CORE_NUM;
taskInitParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(currCpuid);
@@ -86,7 +86,7 @@ static UINT32 Testcase(VOID)
taskInitParam.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
taskInitParam.pcName = "SmpCpup007_task02";
taskInitParam.usTaskPrio = TASK_PRIO_TEST - 1;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
taskInitParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testSmpCpupTaskID02, &taskInitParam);
diff --git a/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_008.c b/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_008.c
index 3be498fc..3a961ac9 100644
--- a/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_008.c
+++ b/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_008.c
@@ -72,7 +72,7 @@ static UINT32 Testcase(VOID)
taskInitParam.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
taskInitParam.pcName = "SmpCpup008_task01";
taskInitParam.usTaskPrio = TASK_PRIO_TEST - 2; // 2, used to calculate the task priority.
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
/* make sure that created test task is definitely on another core */
UINT32 currCpuid = (ArchCurrCpuid() + 1) % LOSCFG_KERNEL_CORE_NUM;
taskInitParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(currCpuid);
@@ -85,7 +85,7 @@ static UINT32 Testcase(VOID)
taskInitParam.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
taskInitParam.pcName = "SmpCpup008_task02";
taskInitParam.usTaskPrio = TASK_PRIO_TEST - 1; // 1, used to calculate the task priority.
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
taskInitParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testSmpCpupTaskID02, &taskInitParam);
diff --git a/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_009.c b/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_009.c
index d64b8486..034ad59d 100644
--- a/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_009.c
+++ b/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_009.c
@@ -56,7 +56,7 @@ static void Task01(void)
taskInitParam.pcName = "SmpCpup009_task03";
taskInitParam.usTaskPrio = TASK_PRIO_TEST - 2; // 2, used to calculate the task priority.
taskInitParam.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
taskInitParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testSmpCpupTaskID03, &taskInitParam);
@@ -96,7 +96,7 @@ static UINT32 Testcase(VOID)
taskInitParam.pcName = "SmpCpup009_task01";
taskInitParam.usTaskPrio = TASK_PRIO_TEST - 2; // 2, used to calculate the task priority.
taskInitParam.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
/* make sure that created test task is definitely on another core */
UINT32 currCpuid = (ArchCurrCpuid() + 1) % LOSCFG_KERNEL_CORE_NUM;
taskInitParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(currCpuid);
@@ -109,7 +109,7 @@ static UINT32 Testcase(VOID)
taskInitParam.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
taskInitParam.pcName = "SmpCpup009_task02";
taskInitParam.usTaskPrio = TASK_PRIO_TEST - 1; // 1, used to calculate the task priority.
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
taskInitParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testSmpCpupTaskID02, &taskInitParam);
diff --git a/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_010.c b/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_010.c
index d2037338..3bcbb4b5 100644
--- a/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_010.c
+++ b/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_010.c
@@ -75,7 +75,7 @@ static UINT32 Testcase(VOID)
taskInitParam.pcName = "SmpCpup001_task01";
taskInitParam.usTaskPrio = TASK_PRIO_TEST - 2; // 2, used to calculate the task priority.
taskInitParam.uwResved = LOS_TASK_STATUS_DETACHED;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
/* make sure that created test task is definitely on another core */
UINT32 currCpuid = (ArchCurrCpuid() + 1) % LOSCFG_KERNEL_CORE_NUM;
taskInitParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(currCpuid);
@@ -88,7 +88,7 @@ static UINT32 Testcase(VOID)
taskInitParam.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
taskInitParam.pcName = "SmpCpup001_task02";
taskInitParam.usTaskPrio = TASK_PRIO_TEST - 1; // 1, used to calculate the task priority.
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
taskInitParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testSmpCpupTaskID02, &taskInitParam);
diff --git a/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_011.c b/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_011.c
index b572f834..a4056e0e 100644
--- a/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_011.c
+++ b/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_011.c
@@ -95,7 +95,7 @@ static UINT32 Testcase(VOID)
taskInitParam.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
taskInitParam.pcName = "SmpCpup001_task01";
taskInitParam.usTaskPrio = TASK_PRIO_TEST - 2; // 2, used to calculate the task priority.
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
/* make sure that created test task is definitely on another core */
UINT32 currCpuid = (ArchCurrCpuid() + 1) % LOSCFG_KERNEL_CORE_NUM;
taskInitParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(currCpuid);
@@ -108,7 +108,7 @@ static UINT32 Testcase(VOID)
taskInitParam.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
taskInitParam.pcName = "SmpCpup001_task02";
taskInitParam.usTaskPrio = TASK_PRIO_TEST - 1; // 1, used to calculate the task priority.
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
taskInitParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testSmpCpupTaskID02, &taskInitParam);
diff --git a/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_012.c b/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_012.c
index 7a320ed6..42206fb7 100644
--- a/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_012.c
+++ b/testsuites/kernel/sample/kernel_extend/cpup/smp/It_smp_extend_cpup_012.c
@@ -78,7 +78,7 @@ static UINT32 Testcase(VOID)
taskInitParam.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
taskInitParam.pcName = "SmpCpup001_task01";
taskInitParam.usTaskPrio = TASK_PRIO_TEST - 2; // 2, used to calculate the task priority.
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
/* make sure that created test task is definitely on another core */
UINT32 currCpuid = (ArchCurrCpuid() + 1) % LOSCFG_KERNEL_CORE_NUM;
taskInitParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(currCpuid);
@@ -91,7 +91,7 @@ static UINT32 Testcase(VOID)
taskInitParam.uwStackSize = LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE;
taskInitParam.pcName = "SmpCpup001_task02";
taskInitParam.usTaskPrio = TASK_PRIO_TEST - 1; // 1, used to calculate the task priority.
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
taskInitParam.usCpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
ret = LOS_TaskCreate(&g_testSmpCpupTaskID02, &taskInitParam);
diff --git a/testsuites/kernel/sample/posix/mutex/It_posix_mutex.c b/testsuites/kernel/sample/posix/mutex/It_posix_mutex.c
index da2a543f..c253061e 100644
--- a/testsuites/kernel/sample/posix/mutex/It_posix_mutex.c
+++ b/testsuites/kernel/sample/posix/mutex/It_posix_mutex.c
@@ -119,7 +119,7 @@ VOID ItSuitePosixMutex(void)
ItPosixMux072();
ItPosixMux073();
ItPosixMux074();
-#if (LOSCFG_KERNEL_SMP != YES)
+#ifndef LOSCFG_KERNEL_SMP
ItPosixMux075();
#endif
ItPosixMux076();
diff --git a/testsuites/kernel/sample/posix/pthread/It_posix_pthread.c b/testsuites/kernel/sample/posix/pthread/It_posix_pthread.c
index 160b5a5f..3607d837 100644
--- a/testsuites/kernel/sample/posix/pthread/It_posix_pthread.c
+++ b/testsuites/kernel/sample/posix/pthread/It_posix_pthread.c
@@ -251,7 +251,7 @@ VOID ItSuitePosixPthread()
ItPosixPthread044();
ItPosixPthread045();
ItPosixPthread046();
-#if (LOSCFG_KERNEL_SMP != YES)
+#ifndef LOSCFG_KERNEL_SMP
ItPosixPthread047(); // pthread preemption, may not happen on smp
#endif
ItPosixPthread048();
diff --git a/testsuites/kernel/sample/posix/pthread/full/It_posix_pthread_066.c b/testsuites/kernel/sample/posix/pthread/full/It_posix_pthread_066.c
index a7e03f6c..76132c12 100644
--- a/testsuites/kernel/sample/posix/pthread/full/It_posix_pthread_066.c
+++ b/testsuites/kernel/sample/posix/pthread/full/It_posix_pthread_066.c
@@ -76,7 +76,7 @@ static VOID *PthreadF01(void *argument)
ret = pthread_create(&g_newTh2, &attr, PthreadF02, NULL);
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
while (g_testCount < 2) { // 2, delay until g_testCount is equal to 2.
TestBusyTaskDelay(1);
}
diff --git a/testsuites/kernel/sample/posix/pthread/full/It_posix_pthread_068.c b/testsuites/kernel/sample/posix/pthread/full/It_posix_pthread_068.c
index 6ced64b9..a71ec33b 100644
--- a/testsuites/kernel/sample/posix/pthread/full/It_posix_pthread_068.c
+++ b/testsuites/kernel/sample/posix/pthread/full/It_posix_pthread_068.c
@@ -74,7 +74,7 @@ static VOID *PthreadF01(VOID *argument)
ret = pthread_create(&g_newTh2, &attr, PthreadF02, NULL);
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
while (g_testCount < 2) { // 2, delay until g_testCount is equal to 2.
TestBusyTaskDelay(1);
}
diff --git a/testsuites/kernel/src/iCunit.c b/testsuites/kernel/src/iCunit.c
index 9b8b709a..1515ba2d 100644
--- a/testsuites/kernel/src/iCunit.c
+++ b/testsuites/kernel/src/iCunit.c
@@ -50,7 +50,7 @@ extern "C" {
#define ARRAY_SIZE 2
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
LITE_OS_SEC_BSS SPIN_LOCK_INIT(g_testSuitSpin);
#endif
@@ -125,13 +125,13 @@ u_long ICunitRand(void)
void ICunitSaveErr(iiUINT32 line, iiUINT32 retCode)
{
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
UINT32 intSave;
TESTSUIT_LOCK(intSave);
#endif
g_iCunitErrCode = ((g_iCunitErrCode == 0) && (g_iCunitErrLineNo == 0)) ? (iiUINT32)retCode : g_iCunitErrCode;
g_iCunitErrLineNo = (g_iCunitErrLineNo == 0) ? line : g_iCunitErrLineNo;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
TESTSUIT_UNLOCK(intSave);
#endif
}
@@ -184,7 +184,7 @@ iUINT32 ICunitAddCase(const iCHAR *caseName, CASE_FUNCTION caseFunc, iUINT16 tes
UINT32 g_cunitInitFlag = 0;
iUINT32 ICunitInit(void)
{
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
if (LOS_AtomicCmpXchg32bits(&g_cunitInitFlag, 1, 0)) {
PRINTK("other core already done iCunitInit\n");
return (iUINT32)ICUNIT_SUCCESS;
diff --git a/testsuites/kernel/src/osTest.c b/testsuites/kernel/src/osTest.c
index a9762cec..5317ea77 100644
--- a/testsuites/kernel/src/osTest.c
+++ b/testsuites/kernel/src/osTest.c
@@ -259,7 +259,7 @@ void TestHwiTrigger(unsigned int irq)
VOID TestExtraTaskDelay(UINT32 tick)
{
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
// trigger task schedule may occor on another core
// needs adding delay and checking status later
LOS_TaskDelay(tick);
@@ -327,7 +327,7 @@ VOID TestTestHwiDelete(unsigned int irq, VOID *devId)
VOID TestDumpCpuid(VOID)
{
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
PRINT_DEBUG("%d,cpuid = %d\n", LOS_CurTaskIDGet(), ArchCurrCpuid());
#endif
return;
@@ -530,7 +530,7 @@ void TestSystemInit(void)
testProcess = OS_PCB_FROM_PID(pid);
g_testTskHandle = testProcess->threadGroupID;
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
((LosTaskCB *)OS_TCB_FROM_TID(g_testTskHandle))->cpuAffiMask = CPUID_TO_AFFI_MASK(ArchCurrCpuid());
#endif
}
diff --git a/testsuites/unittest/common/include/osTest.h b/testsuites/unittest/common/include/osTest.h
index 5fa25e69..0623b40a 100644
--- a/testsuites/unittest/common/include/osTest.h
+++ b/testsuites/unittest/common/include/osTest.h
@@ -84,7 +84,7 @@
stTestTask.uwResved = LOS_TASK_STATUS_DETACHED; \
} while (0)
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
#define TEST_TASK_PARAM_INIT_AFFI(stTestTask, task_name, entry, prio, affi) \
TEST_TASK_PARAM_INIT(stTestTask, task_name, entry, prio) \
stTestTask.usCpuAffiMask = affi;
diff --git a/testsuites/unittest/common/osTest.cpp b/testsuites/unittest/common/osTest.cpp
index 6bcb34de..a771a147 100644
--- a/testsuites/unittest/common/osTest.cpp
+++ b/testsuites/unittest/common/osTest.cpp
@@ -162,7 +162,7 @@ UINT32 LosTaskDelay(UINT32 tick)
VOID TestExtraTaskDelay(UINT32 uwTick)
{
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
// trigger task schedule may occor on another core
// needs adding delay and checking status later
LosTaskDelay(uwTick);
diff --git a/testsuites/unittest/fs/proc/It_vfs_proc.cpp b/testsuites/unittest/fs/proc/It_vfs_proc.cpp
index df08e332..a4d42574 100644
--- a/testsuites/unittest/fs/proc/It_vfs_proc.cpp
+++ b/testsuites/unittest/fs/proc/It_vfs_proc.cpp
@@ -48,7 +48,7 @@ VOID ItSuiteVfsProc(VOID)
#endif
#if defined(LOSCFG_USER_TEST_PRESSURE)
-#if(LOSCFG_KERNEL_SMP != YES)
+#ifndef LOSCFG_KERNEL_SMP
#endif
#endif
}
diff --git a/testsuites/unittest/posix/mqueue/full/It_posix_queue_124.cpp b/testsuites/unittest/posix/mqueue/full/It_posix_queue_124.cpp
index a1e96331..774c8dd1 100644
--- a/testsuites/unittest/posix/mqueue/full/It_posix_queue_124.cpp
+++ b/testsuites/unittest/posix/mqueue/full/It_posix_queue_124.cpp
@@ -106,7 +106,7 @@ static UINT32 Testcase(VOID)
uret = LOS_HwiCreate(HWI_NUM_TEST1, 1, 0, (HWI_PROC_FUNC)HwiF02, 0);
ICUNIT_GOTO_EQUAL(uret, MQUEUE_NO_ERROR, uret, EXIT);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST1, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
@@ -117,7 +117,7 @@ static UINT32 Testcase(VOID)
uret = LOS_HwiCreate(HWI_NUM_TEST, 1, 0, (HWI_PROC_FUNC)HwiF01, 0);
ICUNIT_GOTO_EQUAL(uret, MQUEUE_NO_ERROR, uret, EXIT1);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
HalIrqSetAffinity(HWI_NUM_TEST, CPUID_TO_AFFI_MASK(ArchCurrCpuid()));
#endif
diff --git a/testsuites/unittest/posix/mqueue/posix_mqueue_test.cpp b/testsuites/unittest/posix/mqueue/posix_mqueue_test.cpp
index 49475701..b49ce837 100644
--- a/testsuites/unittest/posix/mqueue/posix_mqueue_test.cpp
+++ b/testsuites/unittest/posix/mqueue/posix_mqueue_test.cpp
@@ -257,7 +257,7 @@ HWTEST_F(PosixMqueueTest, ItPosixQueue016, TestSize.Level0)
ItPosixQueue016();
}
-#if (LOSCFG_KERNEL_SMP != YES)
+#ifndef LOSCFG_KERNEL_SMP
/**
* @tc.name: IT_POSIX_QUEUE_113
* @tc.desc: function for PosixMqueueTest
diff --git a/testsuites/unittest/posix/pthread/full/It_posix_pthread_066.cpp b/testsuites/unittest/posix/pthread/full/It_posix_pthread_066.cpp
index 260017e7..193faba3 100644
--- a/testsuites/unittest/posix/pthread/full/It_posix_pthread_066.cpp
+++ b/testsuites/unittest/posix/pthread/full/It_posix_pthread_066.cpp
@@ -71,7 +71,7 @@ static VOID *pthread_f01(void *argument)
ret = pthread_create(&g_newTh2, &attr, pthread_f02, NULL);
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
-#if (LOSCFG_KERNEL_SMP == YES)
+#ifdef LOSCFG_KERNEL_SMP
while (g_testCount < 2) {
TestBusyTaskDelay(1);
}
diff --git a/tools/build/mk/los_config.mk b/tools/build/mk/los_config.mk
index cc97cdfe..9c3923bd 100644
--- a/tools/build/mk/los_config.mk
+++ b/tools/build/mk/los_config.mk
@@ -185,12 +185,6 @@ ifeq ($(LOSCFG_KERNEL_CPUP), y)
LITEOS_CPUP_INCLUDE := -I $(LITEOSTOPDIR)/kernel/extended/cpup
endif
-ifeq ($(LOSCFG_KERNEL_SCHED_STATISTICS), y)
- LITEOS_CMACRO += -DLOSCFG_KERNEL_SCHED_STATISTICS=1
-else
- LITEOS_CMACRO += -DLOSCFG_KERNEL_SCHED_STATISTICS=0
-endif
-
ifeq ($(LOSCFG_KERNEL_DYNLOAD), y)
LITEOS_BASELIB += -ldynload
LIB_SUBDIRS += kernel/extended/dynload