Commit Graph

149 Commits

Author SHA1 Message Date
openharmony_ci eca03e5ed6 !195 feat: L0新增posix接口sem_getvalue
Merge pull request !195 from x_xiny/master
2021-06-24 07:15:06 +00:00
x_xiny 8649b14591 feat: m核新增posix接口sem_getvalue
【背景】
 m核新增posix接口适配

【修改方案】
 接口新增sem_getvalue,并在内核适配相应接口

【影响】
 无

 re #I3WW8S

 Signed-off-by: x_xiny <1301913191@qq.com>
 Change-Id: I65a4baa242aaedc2fec9b6ed705dbb1ddb6e70c9

Change-Id: Id4c38a5dd4ac4e90f1bd032a39dcb97ce29de5f9
2021-06-24 10:43:44 +08:00
YOUR_NAME e5e9289a08 fix: 调度过程低概率触发OsSchedTaskEnQueue断言,导致系统异常
当任务A调用LOS_EventRead阻塞开中断后,突然响应中断B,此时任务A已入阻塞链表,
任务状态为OS_TASK_STATUS_PEND | OS_TASK_STATUS_RUNNING;而B的回调函数中调用
LOS_EventWrite唤醒任务A,这个过程会调用OsSchedTaskWake,将任务A从阻塞链表中
取出,并去除OS_TASK_STATUS_PEND状态,且调用OsSchedTaskEnQueue将任务A添
加到调度队列并增加OS_TASK_STATUS_READY状态。OsSchedTaskWake全部流程完成后,
会开中断并调用LOS_Schedule,在LOS_Schedule流程中由于当前任务为A,且状态为
OS_TASK_STATUS_RUNNING | OS_TASK_STATUS_READY,会再次调用OsSchedTaskEnQueue,
从而被OsSchedTaskEnQueue断言拦住。修改方式:当任务状态含有OS_TASK_STATUS_RUNNING时
OsSchedTaskWake中不调用OsSchedTaskEnQueue。

close: #I3VX9Y

Signed-off-by: zff <zhangfanfan2@huawei.com>
Change-Id: I28f33d25504ade47469980fd6bb0b922bf4756da
2021-06-23 19:25:58 +08:00
openharmony_ci d0efdfc20d !169 feat: L0支持低功耗投票框架
Merge pull request !169 from zhushengle/PM
2021-06-22 11:55:22 +00:00
zhushengle 558ce14bec feat: L0 支持低功耗框架
1.【需求描述】
 L0 支持低功耗投票框架, 使内核与应用、驱动分离开,通过注册及投票机制控制系统的低功耗模式,
  减低系统功耗,提升设备电池寿命。
2.【方案描述】
 (1).提供注册机制,使驱动与内核分离
  (2).提供投票机制,判断系统运行模式
  (3).记录持锁设备,便于回溯
  进入:系统运行进入idle任务时判断当前的功耗模式,如果上层应用未对当前功耗模式(deep和shutdown)
 持锁,则系统准备进入当前模式,首先所有设备依次进入当前模式,如果有设备进入当前模式失败,则恢复
 已进入当前模式的所有设备,并且功耗模式变为normal模式;设备依次进入当前功耗模式后cpu再进入当前
 功耗模式。
  恢复:功耗模式为deep时,需要恢复逻辑,时系统恢复运行。当有中断出发时,系统会退出低功耗模式,
  恢复顺序为:首先cpu先恢复,然后设备依次恢复。

BREAKING CHANGE:
1.原调度中基于tick timer的低功耗扩展和当前的pm模块合并,删除原对外接口LOS_SchedSleepInit,
 变为pm模块统一提供的LOS_PmRegistered接口.
2.原来在arch los_timer.h下提供的低功耗模式为枚举LOS_SysSleepEnum,其中OS_SYS_NORMAL_SLEEP
  和OS_SYS_DEEP_SLEEP不符合对外定义,统一修改为LOS_SYS_NORMAL_SLEEP和LOS_SYS_DEEP_SLEEP,
  并移至los_pm.h中.
3.VOID HalEnterSleep(LOS_SysSleepEnum sleep) 变更为UINT32 HalEnterSleep(VOID).

Close #I3UDNV

Signed-off-by: zhushengle <zhushengle@huawei.com>
Change-Id: Id5382c42c8055ba7850895a3f575130a73e38a65
2021-06-22 13:15:06 +08:00
openharmony_ci 8df07fe3cc !182 fix: add API LOS_HwiCreate、LOS_HwiDelete
Merge pull request !182 from kenneth/HWI
2021-06-21 12:38:07 +08:00
openharmony_ci 0f7d2fcf07 !193 fix: 延时队列为NULL时,返回的响应时间为64位最大值,导致无法更新tick timer的响应周期
Merge pull request !193 from zhushengle/sched
2021-06-18 10:09:31 +08:00
kenneth eb668eb9e0 fix: add API LOS_HwiCreate and LOS_HwDelete
新增对外接口LOS_HwiCreate、LOS_HwiDelete

close #I3R75F

Signed-off-by: kenneth <459864689@qq.com>
2021-06-18 08:53:22 +08:00
zhushengle bcec32e389 fix: 延时队列为NULL时,返回的响应时间为64位最大值,导致无法更新tick timer的响应周期
问题描述:
  当g_schedResponseTime = OS_SCHED_MAX_RESPONSE_TIME,且nextExpireTime =(UINT64-1时,
  表示系统的延时队列已为NULL, 此时tick timer 中应该设置为最大值,但由于判断
  g_schedResponseTime - nextExpireTime >= OS_CYCLE_PER_TICK,导致条件不成立,直接返回,
  无法将其设置为最大值,导致tick 中断一直频繁响应。
解决方案:
  将延时队列为NULL时的返回值以及idle线程的时间片修改为OS_SCHED_MAX_RESPONSE_TIME - OS_CYCLE_PER_TICK,
  保证延时队列为NULL,能够正常设置tick响应的最大值。

Close #I3W1LF

Change-Id: I0d09119240ae5a50ddcb0c96fb23cd3d6e70b892
Signed-off-by: zhushengle <zhushengle@huawei.com>
2021-06-17 20:23:13 +08:00
li_zan 7259289bd9 fix: 修复littlefs编译fs.c缺少头文件件依赖配置+若干musl库的缺失问题+多分区规格宏配置问题
close:#I3VT11

Signed-off-by: li_zan <371442490@qq.com>
2021-06-17 17:03:41 +08:00
rtos-lover b6664e66f1 fix: fix backtrace check issue
fix issue that when memleak check is enabled, backtace is not enabled

close https://gitee.com/openharmony/kernel_liteos_m/issues/I3VTKD

Signed-off-by: rtos-lover <zhushangyuan@hotmail.com>
2021-06-16 17:12:41 +08:00
openharmony_ci 468ce69f27 !180 update: rename LOS_BackTraceInit
Merge pull request !180 from kenneth/BackTraceInit
2021-06-16 13:45:04 +08:00
openharmony_ci 48067a0596 !178 littlefs三方源码采用GN编译修改上库+默认Mount路径可配置
Merge pull request !178 from li_zan/master
2021-06-16 10:58:13 +08:00
kenneth a0a32188ff update: rename LOS_BackTraceInit
change function name LOS_BackTraceInit and involve it in los_init.c when macro is not set to 0

close https://gitee.com/openharmony/kernel_liteos_m/issues/I3SYQQ

Signed-off-by: kenneth <459864689@qq.com>
2021-06-16 08:51:00 +08:00
li_zan bdb614bc2b fix: littlefs三方源码采用GN编译修改上库
close:I3VJ6X

Signed-off-by: li_zan <371442490@qq.com>
2021-06-15 19:56:50 +08:00
openharmony_ci 9b656ac3c1 !172 fix: fix print format compilation warning
Merge pull request !172 from kenneth/printf_format_warning
2021-06-11 13:19:52 +08:00
kenneth ef12c89c7a fix: fix print format compilation warning
fix print format compilation warning by changing 0x%x to 0x%p

close https://gitee.com/openharmony/kernel_liteos_m/issues/I3OFSQ

Signed-off-by: kenneth <459864689@qq.com>
2021-06-10 14:52:47 +08:00
JerryH 97a5b6d8dc Merge branch 'master' of gitee.com:openharmony/kernel_liteos_m into backtrace 2021-06-09 10:41:58 +08:00
openharmony_ci 7ab7ae7ae7 !137 fix: fix typos
Merge pull request !137 from rtos-lover/los_sched.c
2021-06-05 13:53:35 +08:00
openharmony_ci 9d77efe6aa !156 fix: correct the counter of exception type
Merge pull request !156 from kenneth/los_arch_interrupt.h2
2021-06-04 14:44:41 +08:00
kenneth bff65877a2 fix: correct the counter of exception type
correct the counter of exception type from 19 to 21

close https://gitee.com/openharmony/kernel_liteos_m/issues/I3SR54

Signed-off-by: kenneth <459864689@qq.com>
2021-06-03 20:45:12 +08:00
kenneth 811d3fae8a fix: fix typo in comment
The word wantted is misspelled and should be changed to wanted. And expected-size is better than wanted size.

close https://gitee.com/openharmony/kernel_liteos_m/issues/I3RW6C

Signed-off-by: kenneth <459864689@qq.com>
2021-06-03 20:39:33 +08:00
openharmony_ci 05937ee49c !144 调整hook类型和位置,提升调试的易用性
Merge pull request !144 from Zhaotianyu/0529hook_fix
2021-06-03 15:18:33 +08:00
openharmony_ci 804f5a809f !130 fix: fix macro typo
Merge pull request !130 from kenneth/STACK_PROTECTION
2021-06-03 15:14:10 +08:00
Zhaotianyu b4cfdcfbf5 Merge branch 'master' of gitee.com:openharmony/kernel_liteos_m into 0529hook_fix 2021-06-03 11:08:31 +08:00
arvinzzz 2d9bbd2769 fix: 修复不规范的copyright
close: #I3SPJ1
Change-Id: I6cb01024ef342a0190f5dc9f6cb3a1e815692832

Signed-off-by: arvinzzz <fcykztyu@163.com>
Change-Id: I45c63592b08d29587778209de6af17f932dc86d0
2021-06-02 11:07:59 +08:00
arvinzzz 369320de37 fix: 调整hook类型和位置,方便调试
close: #I3TGZS
Change-Id: Idba021ec7595d2f25a23102b6610e0f29cdd1209
Signed-off-by: arvinzzz <fcykztyu@163.com>

Change-Id: I9f1f745c6389de8bd8ca589bd1a3dc5311962527
2021-06-02 10:28:24 +08:00
YOUR_NAME ca1792aa4b feat(liteos_m): support backtrace for riscv
Support backtrace for riscv when the compilation option(-fno-omit-frame-pointer) is not turned on.

fix #I3RVXY

Change-Id: Ie7d8a223167e5c540367bc96db646b821dae9fd0
2021-05-25 11:10:28 +08:00
rtos-lover 191644e441 fix: fix typos
Correct words function、procedure

close  https://gitee.com/openharmony/kernel_liteos_m/issues/I3RR6A
2021-05-19 14:49:13 +08:00
rtos-lover c70b28bf78 fix: fix LOS_TaskNameGet comment
fix comment for the function LOS_TaskNameGet

close https://gitee.com/openharmony/kernel_liteos_m/issues/I3QJVY
2021-05-19 14:33:51 +08:00
openharmony_ci 930e92ebe2 !131 fix: fix destroy typo
Merge pull request !131 from kenneth/los_event.h
2021-05-19 13:37:20 +08:00
openharmony_ci be5344ae75 !132 fix: correct ECB in comment
Merge pull request !132 from kenneth/los_sem.c
2021-05-19 13:35:43 +08:00
openharmony_ci 456bef2141 !133 fix: fix length typo
Merge pull request !133 from kenneth/los_queue.h
2021-05-19 13:35:03 +08:00
kenneth e772ccb3cc fix: change queuePosion to queuePosition 2021-05-19 08:35:48 +08:00
openharmony_ci 0e14ddffd3 !129 fix: fix __cplusplus typo
Merge pull request !129 from kenneth/task_sample.h
2021-05-18 14:02:05 +08:00
kenneth 98d65801de fix: fix length typo
correct length、there、necessary spell

close https://gitee.com/openharmony/kernel_liteos_m/issues/I3QQA8
2021-05-18 11:23:43 +08:00
kenneth e2aeb1ff1d fix: correct ECB in comment
change ECBs to semaphore CBs, and remove extra blank

close https://gitee.com/openharmony/kernel_liteos_m/issues/I3RPRQ
2021-05-18 11:09:48 +08:00
kenneth 4ba6259e94 fix: fix destroy typo
change LOS_ERRNO_EVENT_SHOULD_NOT_DESTORY to LOS_ERRNO_EVENT_SHOULD_NOT_DESTROYED

close https://gitee.com/openharmony/kernel_liteos_m/issues/I3RQXS
2021-05-18 10:53:39 +08:00
kenneth 16003604a9 fix: fix macro typo
change LOSCFG_EXC_HRADWARE_STACK_PROTECTION to LOSCFG_EXC_HARDWARE_STACK_PROTECTION

close https://gitee.com/openharmony/kernel_liteos_m/issues/I3NUX6
2021-05-18 10:02:03 +08:00
kenneth c3eb3e59e6 fix: fix __cplusplus typo
remove extra c in macro definition  __cpluscplus

close https://gitee.com/openharmony/kernel_liteos_m/issues/I3QQAF
2021-05-18 09:51:34 +08:00
openharmony_ci bb84279cc2 !112 fix: fix function name
Merge pull request !112 from rtos-lover/los_sched
2021-05-18 09:42:55 +08:00
openharmony_ci 3feb4f26f3 !125 增强L0 低功耗可扩展性
Merge pull request !125 from zhushengle/sleep
2021-05-17 22:08:19 +08:00
openharmony_ci 5ef2efb347 !118 支持IAR工具的Cortex-m33 TrustZone
Merge pull request !118 from JerryH/master
2021-05-17 21:59:13 +08:00
openharmony_ci 8ef21e0b41 !115 fix: correct spelling
Merge pull request !115 from rtos-lover/los_swtmr
2021-05-15 09:45:21 +08:00
openharmony_ci 62f6531539 !114 fix: correct typo
Merge pull request !114 from rtos-lover/los_task
2021-05-15 09:44:01 +08:00
openharmony_ci 439368edc1 !111 fix: correct typo in los_memory.c
Merge pull request !111 from rtos-lover/los_mem
2021-05-15 09:42:02 +08:00
openharmony_ci 0be2ecfdd0 !110 fix: corrent spelling
Merge pull request !110 from rtos-lover/los_debug
2021-05-15 09:41:16 +08:00
zhushengle 43c04f6f5c fix:Low power expansion.
Close #I3RCHR

Change-Id: I8db9ae791b234b8237ce5a8e56d4d6581833b9ee
2021-05-14 17:08:47 +08:00
openharmony_ci 4166768998 !122 LOS_IntLock的返回类型实际为UINT32,不需要定义为UINTPTR,需要修改
Merge pull request !122 from zhangfanfan2/master
2021-05-14 16:11:11 +08:00
YOUR_NAME eac4a04153 Fix memory leak check and interity error check.
Delete redundant judgments.

Close #I3P10Y and #I3QNLT

Change-Id: I94ff34099bc39345ef5490f185f70c4b87bfd415
2021-05-14 14:49:17 +08:00