Compare commits

..

4 Commits

Author SHA1 Message Date
openharmony_ci
5fa299b4aa !1026 修复task命令打印逻辑问题
Merge pull request !1026 from wangchen/0216_m
2023-03-14 07:54:35 +00:00
root
b02c64dc42 fix: posix用例存在mutex资源泄露
方案描述:
1, 对posix中使用锁之后,增加对锁的释放
2, 修改锁后进入shell, 发现task打印线程信息有异常, 又修复了打印相关的逻辑
fix #I64Y7G
Signed-off-by: wangchen <wangchen240@huawei.com>
2023-03-13 21:53:57 +08:00
openharmony_ci
c5a39437f7 !1007 fix: risc-v架构编译告警修复
Merge pull request !1007 from zhushengle/codex
2023-03-08 06:02:16 +00:00
zhushengle
f211029b12 fix: 修复编译告警
Close #I69TZD

Signed-off-by: zhushengle <zhushengle@huawei.com>
Change-Id: I5f837b7980b478a02524f8ba056916ca038c544c
2023-03-07 21:37:07 +08:00
3 changed files with 41 additions and 17 deletions

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2020, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2020-2023 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -43,6 +43,10 @@ extern "C" {
#endif /* __cplusplus */
#endif /* __cplusplus */
#if (LOSCFG_PLATFORM_HWI_WITH_ARG == 0)
#error "LOSCFG_PLATFORM_HWI_WITH_ARG must be set to 1 !!!"
#endif
/**
* @ingroup los_arch_interrupt
* Define the type of a hardware interrupt vector table function.

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2020, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved.
* Copyright (c) 2020-2023 Huawei Device Co., Ltd. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -167,6 +167,7 @@ LITE_OS_SEC_TEXT UINT32 ArchHwiCreate(HWI_HANDLE_T hwiNum,
HWI_PROC_FUNC hwiHandler,
HwiIrqParam *irqParam)
{
(VOID)hwiMode;
UINT32 intSave;
if (hwiHandler == NULL) {
@@ -283,7 +284,7 @@ STATIC VOID ExcInfoDisplayContext(const LosExcInfo *exc)
ExcBackTrace(taskContext->s0);
}
STATIC VOID ExcInfoDisplay(const LosExcContext *excBufAddr)
STATIC VOID ExcInfoDisplay(VOID)
{
PRINTK("\nException Information \n");
@@ -305,6 +306,11 @@ STATIC VOID ExcInfoDisplay(const LosExcContext *excBufAddr)
WEAK UINT32 HalUnalignedAccessFix(UINTPTR mcause, UINTPTR mepc, UINTPTR mtval, VOID *sp)
{
(VOID)mcause;
(VOID)mepc;
(VOID)mtval;
(VOID)sp;
/* Unaligned access fixes are not supported by default */
PRINTK("Unaligned access fixes are not supported by default!\n");
return LOS_NOK;
@@ -329,7 +335,7 @@ VOID HalExcEntry(const LosExcContext *excBufAddr)
}
}
ExcInfoDisplay(excBufAddr);
ExcInfoDisplay();
if (LOS_TaskIsRunning()) {
PRINTK("----------------All Task information ------------\n");

View File

@@ -256,9 +256,9 @@ UINT32 OsGetTaskWaterLine(UINT32 taskID)
}
#if (LOSCFG_BASE_CORE_CPUP == 1)
LITE_OS_SEC_TEXT_MINOR UINT32 OsGetAllTskCpupInfo(CPUP_INFO_S **cpuLessOneSec,
CPUP_INFO_S **cpuTenSec,
CPUP_INFO_S **cpuOneSec)
STATIC UINT32 GetAllTskCpupInfo(CPUP_INFO_S **cpuLessOneSec,
CPUP_INFO_S **cpuTenSec,
CPUP_INFO_S **cpuOneSec)
{
if ((cpuLessOneSec == NULL) || (cpuTenSec == NULL) || (cpuOneSec == NULL)) {
return OS_ERROR;
@@ -304,7 +304,26 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsGetAllTskCpupInfo(CPUP_INFO_S **cpuLessOneSec,
}
#endif
LITE_OS_SEC_TEXT_MINOR VOID OsPrintAllTskInfoHeader(VOID)
STATIC VOID PrintTskInfo(const LosTaskCB *taskCB)
{
UINT32 semID;
if (taskCB->taskStatus & OS_TASK_STATUS_EXIT) {
PRINTK("%4u%9u%10s%#10x%#10x%#11x%#11x%#10x%#7x",
taskCB->taskID, taskCB->priority, OsConvertTskStatus(taskCB->taskStatus),
taskCB->stackSize, 0, 0, 0, 0, 0);
return;
}
semID = (taskCB->taskSem == NULL) ? OS_NULL_SHORT : (((LosSemCB *)taskCB->taskSem)->semID);
PRINTK("%4u%9u%10s%#10x%#10x%#11x%#11x%#10x%#7x",
taskCB->taskID, taskCB->priority, OsConvertTskStatus(taskCB->taskStatus),
taskCB->stackSize, OsGetTaskWaterLine(taskCB->taskID),
(UINT32)(UINTPTR)taskCB->stackPointer, taskCB->topOfStack, taskCB->eventMask, semID);
return;
}
STATIC VOID PrintTskInfoHeader(VOID)
{
PRINTK("\r\n TID Priority Status StackSize WaterLine StackPoint TopOfStack EventMask SemID");
#if (LOSCFG_TASK_MEM_USED == 1)
@@ -341,7 +360,6 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsGetAllTskInfo(VOID)
#if (LOSCFG_KERNEL_PRINTF != 0)
LosTaskCB *taskCB = (LosTaskCB *)NULL;
UINT32 loopNum;
UINT32 semID;
#if (LOSCFG_BASE_CORE_CPUP == 1)
CPUP_INFO_S *cpuLessOneSec = (CPUP_INFO_S *)NULL;
CPUP_INFO_S *cpuTenSec = (CPUP_INFO_S *)NULL;
@@ -354,12 +372,12 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsGetAllTskInfo(VOID)
#endif
#if (LOSCFG_BASE_CORE_CPUP == 1)
if (OsGetAllTskCpupInfo(&cpuLessOneSec, &cpuTenSec, &cpuOneSec) != LOS_OK) {
if (GetAllTskCpupInfo(&cpuLessOneSec, &cpuTenSec, &cpuOneSec) != LOS_OK) {
return OS_ERROR;
}
#endif
#endif /* LOSCFG_BASE_CORE_CPUP */
OsPrintAllTskInfoHeader();
PrintTskInfoHeader();
for (loopNum = 0; loopNum < g_taskMaxNum; loopNum++) {
taskCB = (((LosTaskCB *)g_taskCBArray) + loopNum);
@@ -367,11 +385,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsGetAllTskInfo(VOID)
continue;
}
semID = (taskCB->taskSem == NULL) ? OS_NULL_SHORT : (((LosSemCB *)taskCB->taskSem)->semID);
PRINTK("%4u%9u%10s%#10x%#10x%#11x%#11x%#10x%#7x",
taskCB->taskID, taskCB->priority, OsConvertTskStatus(taskCB->taskStatus),
taskCB->stackSize, OsGetTaskWaterLine(taskCB->taskID),
(UINT32)(UINTPTR)taskCB->stackPointer, taskCB->topOfStack, taskCB->eventMask, semID);
PrintTskInfo(taskCB);
#if (LOSCFG_TASK_MEM_USED == 1)
PRINTK("%#10x", g_taskMemUsed[loopNum]);
#endif