已开启
PR2需求,LOS接口替换为cmsis接口 #4967
huangzijian创建于 1 天前
PR2需求,LOS接口替换为cmsis接口 #4967
已开启
huangzijian创建于 1 天前
huangzijian
huangzijian
1 天前

相关的Issue

原因(目的、解决的问题等)

当前 param 模块在 LiteOS-M 平台下使用 LOS 内核接口(LOS_MuxCreate/Pend/Post/Delete)进行互斥锁操作。
需要将 LOS 接口替换为 CMSIS-RTOS 标准接口(osMutexNew/Acquire/Release/Delete),
以降低对 LiteOS-M 内核私有接口的依赖,提升代码的可移植性和标准化程度。

描述(做了什么,变更了什么)

  1. param_common.h:

    • LITEOS_M 分支下添加 #include "cmsis_os2.h"
    • ParamRWMutex 和 ParamMutex 结构体中 mutex 字段类型由 uint32_t 改为 osMutexId_t
  2. param_osadp.c:

    • 移除 #include "los_task.h" 和 #include "los_mux.h"
    • LOS_MuxCreate 替换为 osMutexNew(NULL)
    • LOS_MuxPend 替换为 osMutexAcquire(lock->mutex, osWaitForever)
    • LOS_MuxPost 替换为 osMutexRelease(lock->mutex)
    • LOS_MuxDelete 替换为 osMutexDelete(lock->mutex)
    • 返回值判断由 LOS_OK 改为 osOK
    • 返回值类型由 uint32_t 改为 osStatus_t

测试用例(新增、改动、可能影响的功能)

验证产品:nearlink_dk_3863(LiteOS-M,RISC-V)
验证方式:

  1. 编译验证:hb build -f 编译通过
  2. 烧录验证:固件烧录成功,系统正常启动
  3. 运行验证:
    • 系统启动日志与修改前一致,无异常错误
    • 无死锁、崩溃等异常

验证产品:hispark_taurus(Linux 内核)
验证方式:

  1. 编译验证:hb build 编译通过
  2. 说明:Linux 内核不受此修改影响(LITEOS_M 分支不生效)

可能影响的功能:

  • LiteOS-M 平台下 param 模块的互斥锁操作
likedislike
合并受阻
openharmony_ciopenharmony_ci成员
1 天前 添加了label:waiting_on_author
openharmony_ci
openharmony_ci成员
1 天前 评论:

感谢提交 Pull Requests !此PR未通过DCO校验。
校验失败可能原因:

1. 未签署“DCO协议”(开发者原创声明协议),在线签署、查看签署状态

2. Commits 中未包含 Signed-off-by信息,参考FAQ处理

修复上述问题后,在PR的评论框输入“check dco” ,单击”评论”,系统将再次进行DCO校验。

当前检测到如下Commits 未包含Signed-off-by信息:


Thanks for submitting a pull request. This pull request has not passed the DCO check.
Possible causes:

1. You have not signed the Developer Certificate of Origin (DCO). Sign the DCO and check DCO status.

2. The commits do not contain the Signed-off-by information. To resolve this issue, see FAQs.

After resolving the preceding issues, enter check dco in the comment box of this pull request and click Comment. The system will check DCO status again.

The following commits do not contain the Signed-off-by information:

likedislike
openharmony_ciopenharmony_ci成员
1 天前 添加了label:dco检查失败