Commit Graph

13 Commits

Author SHA1 Message Date
zhushengle fb11ab181e feat: 同步调度部分优化至liteos_m
1.tick timer与调度进一步剥离
2.性能敏感函数内敛化

Signed-off-by: zhushengle <zhushengle@huawei.com>
Change-Id: I00c27216e286dd7ca9c02db3e2377707d628a786
2022-02-12 14:52:36 +08:00
LiteOS2021 4b607fd074 fix(posix接口融合): posix接口融合,接口规范兼容性修改
posix接口融合,接口规范兼容性修改

BREAKING CHANGE:
接口修改:
calloc
pthread_mutex_init
mq_unlink
pthread_join
pthread_exit
pthread_attr_init
pthread_attr_destroy
pthread_condattr_destroy
pthread_cond_timedwait
pthread_mutexattr_init
pthread_mutexattr_settype
pthread_mutex_destroy
pthread_mutex_timedlock
pthread_mutex_trylockk
pthread_mutex_unlock
sem_getvalue
sem_timedwait
pthread_cond_timedwait
nanosleep
timer_create
timer_settime
timer_gettime
testStdlibStrtoull005
testStdlibStrtol011
testStdlibStrtoul007
testPthread004

新增接口:
CheckForCancel
pthread_setcancelstate
pthread_setcanceltype
pthread_once
pthread_setschedprio
pthread_attr_setstack
pthread_attr_getstack
pthread_condattr_getpshared
pthread_condattr_setpshared
pthread_condattr_getclock
pthread_mutexattr_gettype
CheckMutexAttr
OsMuxPreCheck
sem_trywait
MuxPendForPosix
MuxPostForPosix
增加overrun功能

接口变化:
mq_getsetattr 改为内部接口MqGetSetAttr
GetTickTimeFromNow->OsGetTickTimeFromNow

接口位置转移:
pthread_equal接口由newlib下转移到kal/posix/src/pthread.c中

Signed-off-by: LiteOS2021 <dinglu@huawei.com>
2022-02-10 16:41:12 +08:00
JerryH ecce17ea48 fix: 解决定时器超时但还在队列中无法删除的问题
利用每次创建时,软件定时器timerId都是唯一的(0~0xffffffff循环),在超时写队列时,同时记录软件定时器id,删除的时候更新软件定时器id,那么在处理软件定时器前,
通过队列中记录的id获取软件定时器控制块,如果控制块的id不等于记录的id,那么说明该软件定时器被删除过,将不执行对应回调函数,表现为删除该定时器。

BREAKING CHANGE: SwtmrHandlerItem结构体新增swtmrID字段,用于标识超时队列中软件定时器id

Close #I4LFVD

Signed-off-by: JerryH <huangjieliang@huawei.com>
Change-Id: I716176f177c4bc07adb348936d5568fbadcbebe7
2021-12-08 15:27:49 +08:00
zhushengle 2118c84616 fix: tick 动态化计算优化,减小中断执行时间对系统总体时间的影响,保证软件定时器的响应精度。
方案描述:
    1.周期软件定时器超时添加一个startTime字段,用于记录当前软件定时器的开始计时的时间,
    在定时器响应时,开始时间修改为上一次响应的结束时间(消除了中断执行时间对软件定时器
    的影响)。
    2. 在执行tick中断的过程当中,持有tick动态计算锁,保证在该过程中不会触发tick周期
    的计算,在tick中断结束时统一计算设置。 --- 提升tick中断的执行效率
    3. 在设置tick周期时,减掉tick中断执行的时间,减小周期动态化带来的时间误差
    4.新增LOSCFG_BASE_CORE_TICK_PER_SECOND_MINI配置宏,用于配置tick中断的最小响应精度
Close #I3YGP1

Signed-off-by: zhushengle <zhushengle@huawei.com>
Change-Id: Ia53e4accce497bce870557c2c3387ce51fa3fed3
2021-08-09 21:16:22 +08:00
YOUR_NAME ad8e96a00f fix: los_swtmr.h不满足自包含要求对los_config.h存在依赖,但未包含los_config.h
close: #I40DHM

Signed-off-by: zff <zhangfanfan2@huawei.com>
Change-Id: I6903d2ece13ab0a4aadbc65f737c5f5a0f0a357a
2021-07-20 14:23:40 +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
zhushengle 3907238b0f fix:Fixed kernel error with header protector and header comment description.
Close #I3O4SF

Change-Id: I544cde728fb8131d199a21be440ae02da2fe21fb
2021-04-26 21:13:55 +08:00
zhushengle f685eeb97d IssueNo:#I3IK07
Description:liteos_m scheduling optimization and low power design.
Sig:kernel
Feature or Bugfix:Feature
Binary Source:No

Change-Id: If913b673c9b69039b51ca416be0a77ebccf2773b
2021-04-13 21:48:04 +08:00
mamingshuai 778c8b9930 update openharmony 1.0.1 2021-03-11 20:30:40 +08:00
huangjieliang 25b432927c Description: Sync liteos_m to OpenHarmony.
Reviewed-by: likailong
2021-01-30 18:05:13 +08:00
Caoruihong 1405111aa9 Description: refactor
Reviewed-by: likailong
2020-12-16 17:30:08 +08:00
likailong 72c4acf01e Description: liteos-m refactoring
Reviewed-by: wangmihu, zhushengle
2020-12-02 19:40:34 +08:00
wenjun dc16ffa8cb add OpenHarmony 1.0 baseline 2020-09-08 16:46:24 +08:00