Compare commits

..

26 Commits

Author SHA1 Message Date
openharmony_ci
49bfc90a63 !1167 容器代码container目录位置变更
Merge pull request !1167 from zwx1232718/master
2023-06-09 09:21:56 +00:00
zwx1232718
b0708886fa container dir change
Signed-off-by: zwx1232718 <zhenghui23@huawei.com>
2023-06-09 16:29:23 +08:00
openharmony_ci
a388a3f565 !1148 修复一些typo错误
Merge pull request !1148 from 景涛/master
2023-06-06 13:36:01 +00:00
openharmony_ci
280769ae42 !1163 GN脚本规范化
Merge pull request !1163 from zhushengle/GN
2023-05-23 08:43:40 +00:00
zhushengle
1f3a6c8143 feat: GN脚本规范化
Signed-off-by: zhushengle <zhushengle@huawei.com>
Change-Id: I80b055091a0ff333a859cd35447a851296a67103
2023-05-23 15:56:45 +08:00
openharmony_ci
6c0b0dde23 !1157 test:调整TDD测试用例
Merge pull request !1157 from zhangdengyu/fixTest0424
2023-05-18 12:14:47 +00:00
zhangdengyu
76228c3617 test: TDD用例调整
方案描述:
1、门禁流水线跑单个测试用例.bin文件有时间限制,将用时过长的bin按类型拆分;
2、缩短EDF测试用例的时间;
3、dynload用例改变当前工作路径未恢复导致执行结果的xml文件未生成,在用例结束退出之前恢复当前工作路径。

Close:#I6YIX6

Signed-off-by: zhangdengyu <zhangdengyu2@huawei.com>
Change-Id: I8c6118f9589e8801000ccb0cae9b81e0925696f4
2023-05-18 15:46:12 +08:00
openharmony_ci
5de241eb2a !1160 部件化整改
Merge pull request !1160 from zhushengle/deps
2023-05-09 14:55:31 +00:00
zhushengle
5e68558280 feat: 部件化整改
Close #I71QQ2

Signed-off-by: zhushengle <zhushengle@huawei.com>
Change-Id: I6f4db7c3775907df06b7186310628fcdee71bdb6
2023-05-09 21:40:00 +08:00
openharmony_ci
9c71de6a2e !1158 Fix : 部件化需求整改
Merge pull request !1158 from yinjiaming/bundle
2023-05-05 08:33:35 +00:00
openharmony_ci
243b1e26a4 !1159 test:修复llvm升级导致tdd用例部分失败问题
Merge pull request !1159 from zhangdengyu/fixLlvmBug0428
2023-05-05 05:14:54 +00:00
yinjiaming
47a4fe030b fix:部件需求整改
修复了脚本扫描出的bundle.json的问题,整改了
不符合规范的路径引用

Signed-off-by: yinjiaming <yinjiaming@huawei.com>
Change-Id: I11c321f8707d3e44dd7ee40dac35cf99907fb864
2023-05-04 11:32:59 +08:00
zhangdengyu
577d29aaba test: 修复llvm升级导致tdd用例部分失败问题
方案描述:
1、llvm升级之后对while(1)死循环和给空指针赋值的场景有错误优化的情况;
   用例中在相关函数之前添加__attribute__((optnone))禁止编译器进行错误优化。

Close:#I6V2LN

Signed-off-by: zhangdengyu <zhangdengyu2@huawei.com>
Change-Id: Ic7150909c12a599aeeb0a55b983dfad7a0631cdc
2023-05-04 09:42:38 +08:00
openharmony_ci
d9e9631286 !1156 Fix : 文档失效链接清理
Merge pull request !1156 from yinjiaming/link
2023-04-23 10:59:05 +00:00
yinjiaming
2bd5b686cf fix:文档失效链接清理
文档中部分链接已失效,现予以清理并更换为有效链接

Signed-off-by: yinjiaming <yinjiaming@huawei.com>
Change-Id: Ib9dfa1e3ec74ed85049aca7c064a6d10a1a3ab46
2023-04-23 18:46:42 +08:00
openharmony_ci
8452488bdb !1149 feat:修复测试用例
Merge pull request !1149 from zhangdengyu/muslUpdate0419
2023-04-21 07:33:16 +00:00
openharmony_ci
a04ab13c76 !1152 修复获取容器信息失败
Merge pull request !1152 from zhushengle/container_bug
2023-04-21 06:40:08 +00:00
zhushengle
338f5d7e7d fix: 修复获取容器信息失败
Signed-off-by: zhushengle <zhushengle@huawei.com>
Change-Id: Ie612d14337f7c24812c74f1510c0a8e6fca1c200
2023-04-20 22:35:20 +08:00
zhangdengyu
fa68ebfcd1 feat: 修复测试用例
方案描述:
musl升级修改了接口部分场景下的错误码,测试用例同步修改。

BREAKING CHANGE:
修复测试用例对外变更描述:
1、socket接口v1.2.0中传入错误参数返回EINVAL错误码,更新之后将返回ENOENT错误码;
2、__nscd_query接口v1.2.0中给传入错误参数返回EAFNOSUPPORT错误码,更新之后将返回ENOENT错误码。

Close: #I6WWES

Signed-off-by: zhangdengyu <zhangdengyu2@huawei.com>
Change-Id: Ib8a1e52b164cf78df917dc28c90f02056a80e1ed
2023-04-19 16:43:20 +08:00
”景涛“
24aa6858ee fix some typo errors
Signed-off-by: ”景涛“ <jingtao3@hust.edu.cn>
2023-04-15 22:16:32 +08:00
openharmony_ci
5fb9165c08 !1139 feat: support EDF
Merge pull request !1139 from zhangdengyu/supportEDF0404
2023-04-09 12:38:18 +00:00
zhangdengyu
13f68dcf9c feat: support EDF
方案描述:
1、liteos_a调度框架支持EDF调度算法,默认优先调度EDF策略的任务
2、用户态musl_c库适配新增调度算法,同步修改相关接口以支持用户态创建EDF进程与线程

BREAKING CHANGE:
support EDF对外变更描述:
以下接口支持SCHED_DEADLINE调度策略:
pthread_attr_getschedparam
pthread_attr_setschedparam
pthread_getschedparam
pthread_setschedparam
pthread_create
sched_getscheduler
sched_getparam
sched_setparam
sched_setscheduler

Close:#I6T3P3

Signed-off-by: zhangdengyu <zhangdengyu2@huawei.com>
Change-Id: Ic9fe6896fcae42ae4ee7fe5dfb8e858a6ed19740
2023-04-09 19:46:26 +08:00
openharmony_ci
f332a06e4c !1134 Ignore warnings for llvm15 upgrade
Merge pull request !1134 from enable_llvm15
2023-04-04 07:03:22 +00:00
guzhihao4
1ba32406bb Ignore warnings for enable llvm15
Issue: #I6LPWU

Signed-off-by: guzhihao4 <guzhihao4@huawei.com>
Change-Id: I7b558fa46239081890ae005de65ba8d2bba1d134
2023-04-03 16:42:22 +08:00
openharmony_ci
249ea71a11 !1135 修复 hm_liteipc.c 处的 typo
Merge pull request !1135 from 邹亚龙/master
2023-04-03 07:53:57 +00:00
Yalong Zou
814f5affd0 fix: 修复 hm_liteipc.c 处的 typo
应拼写成 Receive, 因此此处的函数名称应当是 CheckReceivedMsg.

Signed-off-by: Yalong Zou <yalongz@hust.edu.cn>
2023-03-15 23:04:21 +08:00
148 changed files with 3338 additions and 789 deletions

View File

@@ -202,6 +202,10 @@ config("warn_config") {
]
if (defined(LOSCFG_COMPILER_CLANG_LLVM)) {
cflags += [ "-Wno-address-of-packed-member" ]
cflags += [
"-Wno-unused-but-set-variable",
"-Wno-strict-prototypes",
]
}
asmflags = cflags
}
@@ -295,7 +299,7 @@ config("public") {
configs += [
"$HDFTOPDIR:public",
"//drivers/liteos:public",
"$DRIVERS_LITEOS_DIR:public",
]
if (HAVE_DEVICE_SDK) {
@@ -320,8 +324,8 @@ group("modules") {
]
deps += [
"//drivers/liteos",
HDFTOPDIR,
"$DRIVERS_LITEOS_DIR",
"$HDFTOPDIR",
]
if (HAVE_DEVICE_SDK) {
@@ -347,7 +351,7 @@ group("liteos_a") {
deps += [
":apps",
":tests",
"//third_party/musl/scripts/build_lite:strip",
"$THIRDPARTY_MUSL_DIR/scripts/build_lite:strip",
]
if (liteos_skip_make == false) {
deps += [ ":make" ]

View File

@@ -8,64 +8,64 @@
* A核代码静态告警定期清理 ([9ba725c](https://gitee.com/openharmony/kernel_liteos_a/commits/9ba725c3d486dd28fe9b2489b0f95a65354d7d86)), closes [#I4I0O8](https://gitee.com/openharmony/kernel_liteos_a/issues/I4I0O8)
* change default permission of procfs to 0550 ([a776c04](https://gitee.com/openharmony/kernel_liteos_a/commits/a776c04a3da414f73ef7136a543c029cc6dd75be)), closes [#I4NY49](https://gitee.com/openharmony/kernel_liteos_a/issues/I4NY49)
* change the execFile field in TCB to execVnode ([e4a0662](https://gitee.com/openharmony/kernel_liteos_a/commits/e4a06623ceb49b5bead60d45c0534db88b9c666f)), closes [#I4CLL9](https://gitee.com/openharmony/kernel_liteos_a/issues/I4CLL9)
* close file when process interpretor failed ([a375bf5](https://gitee.com/openharmony/kernel_liteos_a/commits/a375bf5668a5e86e082d0e124b538e423023a259)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_a/issues/I4)
* codex 清理 ([9ab3e35](https://gitee.com/openharmony/kernel_liteos_a/commits/9ab3e351d38cdae2ec083048a50a253bc2a3b604)), closes [#I4BL3](https://gitee.com/openharmony/kernel_liteos_a/issues/I4BL3)
* close file when process interpretor failed ([a375bf5](https://gitee.com/openharmony/kernel_liteos_a/commits/a375bf5668a5e86e082d0e124b538e423023a259)), closes [#I4ATQX](https://gitee.com/openharmony/kernel_liteos_a/issues/I4ATQX)
* codex 清理 ([9ab3e35](https://gitee.com/openharmony/kernel_liteos_a/commits/9ab3e351d38cdae2ec083048a50a253bc2a3b604)), closes [#I4BL3S](https://gitee.com/openharmony/kernel_liteos_a/issues/I4BL3S)
* dyload open close failed ([5e87d8c](https://gitee.com/openharmony/kernel_liteos_a/commits/5e87d8c183471166294e2caa041ab4da8570c6a1)), closes [#I452Z7](https://gitee.com/openharmony/kernel_liteos_a/issues/I452Z7)
* fix ppoll ([a55f68f](https://gitee.com/openharmony/kernel_liteos_a/commits/a55f68f957e9f8ad74bd9e0c1b3d27775e0f8c75))
* fix some function declarations ([63fd8bc](https://gitee.com/openharmony/kernel_liteos_a/commits/63fd8bc39b21fffb6990f74e879eefecafad6c88))
* implicit declaration of function 'syscall' in apps/shell ([bd0c083](https://gitee.com/openharmony/kernel_liteos_a/commits/bd0c0835fc58ed5f941dbbc9adfac74253eeb874))
* LOS_Panic和魔法键功能中的使用PRINTK打印依赖任务调度特殊情况下存在打印不出来的问题 ([53addea](https://gitee.com/openharmony/kernel_liteos_a/commits/53addea304de09e0df457b690403ac652bbcea72)), closes [#I4NOC7](https://gitee.com/openharmony/kernel_liteos_a/issues/I4NOC7)
* los_stat_pri.h中缺少依赖的头文件 ([2cd03c5](https://gitee.com/openharmony/kernel_liteos_a/commits/2cd03c55b7a614c648adc965ebfe494d491fe20f)), closes [#I4KEZ1](https://gitee.com/openharmony/kernel_liteos_a/issues/I4KEZ1)
* los_trace.h接口注释错误修正 ([6d24961](https://gitee.com/openharmony/kernel_liteos_a/commits/6d249618aecc216388f9b1a2b48fe0ac6dd19ff2)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_a/issues/I4)
* MMU竞态问题修复 ([748e0d8](https://gitee.com/openharmony/kernel_liteos_a/commits/748e0d8ffb6ee9c8757ed056f575e3abc6c10702)), closes [#I2](https://gitee.com/openharmony/kernel_liteos_a/issues/I2)
* **mtd:** 去除mtd对hisilicon驱动的依赖 ([f7d010d](https://gitee.com/openharmony/kernel_liteos_a/commits/f7d010dfa4cb825096267528e131a9e2735d7505)), closes [#I49](https://gitee.com/openharmony/kernel_liteos_a/issues/I49)
* OsFutexWaitParamCheck函数中absTime为0时直接返回不需要打印 ([3f71be7](https://gitee.com/openharmony/kernel_liteos_a/commits/3f71be75355f11037d9de80cc4d7da0f01905003)), closes [#I4D67](https://gitee.com/openharmony/kernel_liteos_a/issues/I4D67)
* OsLockDepCheckIn异常处理中存在g_lockdepAvailable锁嵌套调用, ([bf030b6](https://gitee.com/openharmony/kernel_liteos_a/commits/bf030b6bb5843151a5b8b8736246a1376a5fb9d0)), closes [#I457](https://gitee.com/openharmony/kernel_liteos_a/issues/I457)
* los_trace.h接口注释错误修正 ([6d24961](https://gitee.com/openharmony/kernel_liteos_a/commits/6d249618aecc216388f9b1a2b48fe0ac6dd19ff2)), closes [#I4CYPZ](https://gitee.com/openharmony/kernel_liteos_a/issues/I4CYPZ)
* MMU竞态问题修复 ([748e0d8](https://gitee.com/openharmony/kernel_liteos_a/commits/748e0d8ffb6ee9c8757ed056f575e3abc6c10702)), closes [#I2WARC](https://gitee.com/openharmony/kernel_liteos_a/issues/I2WARC)
* **mtd:** 去除mtd对hisilicon驱动的依赖 ([f7d010d](https://gitee.com/openharmony/kernel_liteos_a/commits/f7d010dfa4cb825096267528e131a9e2735d7505)), closes [#I49FKL](https://gitee.com/openharmony/kernel_liteos_a/issues/I49FKL)
* OsFutexWaitParamCheck函数中absTime为0时直接返回不需要打印 ([3f71be7](https://gitee.com/openharmony/kernel_liteos_a/commits/3f71be75355f11037d9de80cc4d7da0f01905003)), closes [#I4D67E](https://gitee.com/openharmony/kernel_liteos_a/issues/I4D67E)
* OsLockDepCheckIn异常处理中存在g_lockdepAvailable锁嵌套调用, ([bf030b6](https://gitee.com/openharmony/kernel_liteos_a/commits/bf030b6bb5843151a5b8b8736246a1376a5fb9d0)), closes [#I457ZZ](https://gitee.com/openharmony/kernel_liteos_a/issues/I457ZZ)
* pr模板补充说明 ([e3cd485](https://gitee.com/openharmony/kernel_liteos_a/commits/e3cd485db528490a16a8932d734faab263b44bc9))
* same file mode for procfs files ([c79bcd0](https://gitee.com/openharmony/kernel_liteos_a/commits/c79bcd028e1be34b45cba000077230fa2ef95e68)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_a/issues/I4)
* same file mode for procfs files ([c79bcd0](https://gitee.com/openharmony/kernel_liteos_a/commits/c79bcd028e1be34b45cba000077230fa2ef95e68)), closes [#I4ACTC](https://gitee.com/openharmony/kernel_liteos_a/issues/I4ACTC)
* shell支持exit退出完善帮助信息特殊处理不可见字符 ([cc6e112](https://gitee.com/openharmony/kernel_liteos_a/commits/cc6e11281e63b6bdc9be8e5d3c39f1258eb2ceaa))
* smp初始化中副核冗余的启动框架调用 ([5ce70a5](https://gitee.com/openharmony/kernel_liteos_a/commits/5ce70a50c3733b6ec8cc4b444837e366ec837f69)), closes [#I4F8A5](https://gitee.com/openharmony/kernel_liteos_a/issues/I4F8A5)
* solve SIGCHLD ignored in sigsuspend() ([5a80d4e](https://gitee.com/openharmony/kernel_liteos_a/commits/5a80d4e1a34c94204a0bb01443bf25a4fdb12750)), closes [#I47](https://gitee.com/openharmony/kernel_liteos_a/issues/I47)
* solve SIGCHLD ignored in sigsuspend() ([5a80d4e](https://gitee.com/openharmony/kernel_liteos_a/commits/5a80d4e1a34c94204a0bb01443bf25a4fdb12750)), closes [#I47CKK](https://gitee.com/openharmony/kernel_liteos_a/issues/I47CKK)
* syscall review bugfix ([214f44e](https://gitee.com/openharmony/kernel_liteos_a/commits/214f44e935277c29d347c50b553a31ea7df36448)), closes [#149](https://gitee.com/openharmony/kernel_liteos_a/issues/149)
* **test:** misc09用例因依赖hosts文件而失败 ([f2f5c5f](https://gitee.com/openharmony/kernel_liteos_a/commits/f2f5c5fdc3202610de173e7046adab4df5e59142)), closes [re#I48IZ0](https://gitee.com/re/issues/I48IZ0)
* **test:** 修复sys部分用例因依赖passwd、group文件而失败 ([614cdcc](https://gitee.com/openharmony/kernel_liteos_a/commits/614cdccf91bd2d220c4c76418b53400ce714c6cb)), closes [re#I48](https://gitee.com/re/issues/I48)
* 中断中调用PRINTK概率卡死导致系统不能正常响应中断 ([9726ba1](https://gitee.com/openharmony/kernel_liteos_a/commits/9726ba11a79f3d2d1e616e12ef0bb44e4fc5cd20)), closes [#I4C9](https://gitee.com/openharmony/kernel_liteos_a/issues/I4C9)
* **test:** misc09用例因依赖hosts文件而失败 ([f2f5c5f](https://gitee.com/openharmony/kernel_liteos_a/commits/f2f5c5fdc3202610de173e7046adab4df5e59142)), closes [#I48IZ0](https://gitee.com/openharmony/kernel_liteos_a/issues/I48IZ0)
* **test:** 修复sys部分用例因依赖passwd、group文件而失败 ([614cdcc](https://gitee.com/openharmony/kernel_liteos_a/commits/614cdccf91bd2d220c4c76418b53400ce714c6cb)), closes [#I48IUC](https://gitee.com/openharmony/kernel_liteos_a/issues/I48IUC)
* 中断中调用PRINTK概率卡死导致系统不能正常响应中断 ([9726ba1](https://gitee.com/openharmony/kernel_liteos_a/commits/9726ba11a79f3d2d1e616e12ef0bb44e4fc5cd20)), closes [#I4C9GC](https://gitee.com/openharmony/kernel_liteos_a/issues/I4C9GC)
* 临终遗言重定向内容缺失task相关信息对应的shell命令中申请的内存需要cacheline对齐 ([48ca854](https://gitee.com/openharmony/kernel_liteos_a/commits/48ca854bf07f8dcda9657f950601043a485a1b33)), closes [#I482S5](https://gitee.com/openharmony/kernel_liteos_a/issues/I482S5)
* 优化liteipc任务状态删除功能重复字段 ([5004ef4](https://gitee.com/openharmony/kernel_liteos_a/commits/5004ef4d87b54fb6d7f748ca8212ae155bcefac5)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_a/issues/I4)
* 优化trace buffer初始化删除swtmr 桩中的无效参数 ([b551270](https://gitee.com/openharmony/kernel_liteos_a/commits/b551270ef50cb206360e2eee3dd20ace5cecccb7)), closes [#I4DQ1](https://gitee.com/openharmony/kernel_liteos_a/issues/I4DQ1)
* 修复 virpart.c 不适配的格式化打印问题 ([de29140](https://gitee.com/openharmony/kernel_liteos_a/commits/de29140edf2567f4847876cb1ed5e0b6857420f3)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_a/issues/I4)
* 修复A核文档失效的问题 ([456d255](https://gitee.com/openharmony/kernel_liteos_a/commits/456d255a81c2031be8ebecc2bf897af80c3d3c7a)), closes [#I4U7](https://gitee.com/openharmony/kernel_liteos_a/issues/I4U7)
* 修复A核测试用例失败的问题 ([59329ce](https://gitee.com/openharmony/kernel_liteos_a/commits/59329ce7c6b6a00084df427748e6283287a773c0)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_a/issues/I4)
* 修复A核测试用例失败的问题 ([be68dc8](https://gitee.com/openharmony/kernel_liteos_a/commits/be68dc8bcaf8d965039ae1d792775f00a08adfac)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_a/issues/I4)
* 优化liteipc任务状态删除功能重复字段 ([5004ef4](https://gitee.com/openharmony/kernel_liteos_a/commits/5004ef4d87b54fb6d7f748ca8212ae155bcefac5)), closes [#I4FVHK](https://gitee.com/openharmony/kernel_liteos_a/issues/I4FVHK)
* 优化trace buffer初始化删除swtmr 桩中的无效参数 ([b551270](https://gitee.com/openharmony/kernel_liteos_a/commits/b551270ef50cb206360e2eee3dd20ace5cecccb7)), closes [#I4DQ1X](https://gitee.com/openharmony/kernel_liteos_a/issues/I4DQ1X)
* 修复 virpart.c 不适配的格式化打印问题 ([de29140](https://gitee.com/openharmony/kernel_liteos_a/commits/de29140edf2567f4847876cb1ed5e0b6857420f3)), closes [#I4PEVP](https://gitee.com/openharmony/kernel_liteos_a/issues/I4PEVP)
* 修复A核文档失效的问题 ([456d255](https://gitee.com/openharmony/kernel_liteos_a/commits/456d255a81c2031be8ebecc2bf897af80c3d3c7a)), closes [#I4U7TF](https://gitee.com/openharmony/kernel_liteos_a/issues/I4U7TF)
* 修复A核测试用例失败的问题 ([59329ce](https://gitee.com/openharmony/kernel_liteos_a/commits/59329ce7c6b6a00084df427748e6283287a773c0)), closes [#I4SQDR](https://gitee.com/openharmony/kernel_liteos_a/issues/I4SQDR)
* 修复A核测试用例失败的问题 ([be68dc8](https://gitee.com/openharmony/kernel_liteos_a/commits/be68dc8bcaf8d965039ae1d792775f00a08adfac)), closes [#I4SQDP](https://gitee.com/openharmony/kernel_liteos_a/issues/I4SQDP)
* 修复dispatch单词拼写错误。 ([9b07aec](https://gitee.com/openharmony/kernel_liteos_a/commits/9b07aece2dfa3494cf35e8b388410341508d6224)), closes [#I4BLE8](https://gitee.com/openharmony/kernel_liteos_a/issues/I4BLE8)
* 修复futime提示错误22的BUG ([f2861dd](https://gitee.com/openharmony/kernel_liteos_a/commits/f2861ddfb424af7b99c278273601ce0fab1f37e6))
* 修复jffs2适配层错误释放锁的BUG ([011a55f](https://gitee.com/openharmony/kernel_liteos_a/commits/011a55ff21d95f969abac60bcff96f4c4d7a326d)), closes [#I4FH9](https://gitee.com/openharmony/kernel_liteos_a/issues/I4FH9)
* 修复los_vm_scan.c中内部函数OsInactiveListIsLow冗余代码 ([bc32a1e](https://gitee.com/openharmony/kernel_liteos_a/commits/bc32a1ec0fa5d19c6d2672bcf4a01de5e1be3afb)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_a/issues/I4)
* 修复jffs2适配层错误释放锁的BUG ([011a55f](https://gitee.com/openharmony/kernel_liteos_a/commits/011a55ff21d95f969abac60bcff96f4c4d7a326d)), closes [#I4FH9M](https://gitee.com/openharmony/kernel_liteos_a/issues/I4FH9M)
* 修复los_vm_scan.c中内部函数OsInactiveListIsLow冗余代码 ([bc32a1e](https://gitee.com/openharmony/kernel_liteos_a/commits/bc32a1ec0fa5d19c6d2672bcf4a01de5e1be3afb)), closes [#I4HKFF](https://gitee.com/openharmony/kernel_liteos_a/issues/I4HKFF)
* 修复LOSCFG_FS_FAT_CACHE宏关闭后编译失败的BUG ([63e71fe](https://gitee.com/openharmony/kernel_liteos_a/commits/63e71feca05a8d46a49822c713258738740f0712)), closes [#I3T3N0](https://gitee.com/openharmony/kernel_liteos_a/issues/I3T3N0)
* 修复OsVmPhysFreeListAdd和OsVmPhysFreeListAddUnsafe函数内容重复 ([6827bd2](https://gitee.com/openharmony/kernel_liteos_a/commits/6827bd2a22b78aa05e20d6460412fc7b2d738929)), closes [#I4FL95](https://gitee.com/openharmony/kernel_liteos_a/issues/I4FL95)
* 修复PR520缺陷 ([4033891](https://gitee.com/openharmony/kernel_liteos_a/commits/40338918d9132399ee0494d331930a05b7a13c67)), closes [re#I4DEG5](https://gitee.com/re/issues/I4DEG5)
* 修复shcmd.h需要用宏包起来的问题 ([6c4e4b1](https://gitee.com/openharmony/kernel_liteos_a/commits/6c4e4b16abe9c68fea43d40b2d39b4f0ed4bfc9c)), closes [#I4N50](https://gitee.com/openharmony/kernel_liteos_a/issues/I4N50)
* 修复xts权限用例压测异常问题 ([b0d31cb](https://gitee.com/openharmony/kernel_liteos_a/commits/b0d31cb43f5a8d1c3da574b2b957e3b0e98b3067)), closes [#I3ZJ1](https://gitee.com/openharmony/kernel_liteos_a/issues/I3ZJ1)
* 修复硬随机不可用时,地址随机化不可用问题 ([665c152](https://gitee.com/openharmony/kernel_liteos_a/commits/665c152c27bb86395ddd0395279255f6cdaf7255)), closes [#I4D4](https://gitee.com/openharmony/kernel_liteos_a/issues/I4D4)
* 修复进程用例导致门禁概率失败 ([1ed28b4](https://gitee.com/openharmony/kernel_liteos_a/commits/1ed28b4c80cfd222be08b0c2e71e6287e52bb276)), closes [#I4FO0](https://gitee.com/openharmony/kernel_liteos_a/issues/I4FO0)
* 修复进程线程不稳定用例 ([f6ac03d](https://gitee.com/openharmony/kernel_liteos_a/commits/f6ac03d3e3c56236adc5734d4c059f1fbcc9e0c1)), closes [#I4F1](https://gitee.com/openharmony/kernel_liteos_a/issues/I4F1)
* 修复重复执行内存用例导致系统卡死问题 ([6c2b163](https://gitee.com/openharmony/kernel_liteos_a/commits/6c2b163c7d7c696ef89b17a0275f3cddb3d7cefb)), closes [#I4F7](https://gitee.com/openharmony/kernel_liteos_a/issues/I4F7)
* 修改MMU模块的注释错误 ([1a8e22d](https://gitee.com/openharmony/kernel_liteos_a/commits/1a8e22dcf15944153e013d004fd7bbf24557a8c7)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_a/issues/I4)
* 共享内存问题修复 ([9fdb80f](https://gitee.com/openharmony/kernel_liteos_a/commits/9fdb80f85f92d0167a0456455a94fc6f679797ce)), closes [#I47X2](https://gitee.com/openharmony/kernel_liteos_a/issues/I47X2)
* 内核ERR打印无进程和线程信息不方便问题定位。 ([cb423f8](https://gitee.com/openharmony/kernel_liteos_a/commits/cb423f845462b8cc474c3cba261dadf3943a08ef)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_a/issues/I4)
* 修复PR520缺陷 ([4033891](https://gitee.com/openharmony/kernel_liteos_a/commits/40338918d9132399ee0494d331930a05b7a13c67)), closes [#I4DEG5](https://gitee.com/openharmony/kernel_liteos_a/issues/I4DEG5)
* 修复shcmd.h需要用宏包起来的问题 ([6c4e4b1](https://gitee.com/openharmony/kernel_liteos_a/commits/6c4e4b16abe9c68fea43d40b2d39b4f0ed4bfc9c)), closes [#I4N50W](https://gitee.com/openharmony/kernel_liteos_a/issues/I4N50W)
* 修复xts权限用例压测异常问题 ([b0d31cb](https://gitee.com/openharmony/kernel_liteos_a/commits/b0d31cb43f5a8d1c3da574b2b957e3b0e98b3067)), closes [#I3ZJ1D](https://gitee.com/openharmony/kernel_liteos_a/issues/I3ZJ1D)
* 修复硬随机不可用时,地址随机化不可用问题 ([665c152](https://gitee.com/openharmony/kernel_liteos_a/commits/665c152c27bb86395ddd0395279255f6cdaf7255)), closes [#I4D4TK](https://gitee.com/openharmony/kernel_liteos_a/issues/I4D4TK)
* 修复进程用例导致门禁概率失败 ([1ed28b4](https://gitee.com/openharmony/kernel_liteos_a/commits/1ed28b4c80cfd222be08b0c2e71e6287e52bb276)), closes [#I4FO0N](https://gitee.com/openharmony/kernel_liteos_a/issues/I4FO0N)
* 修复进程线程不稳定用例 ([f6ac03d](https://gitee.com/openharmony/kernel_liteos_a/commits/f6ac03d3e3c56236adc5734d4c059f1fbcc9e0c1)), closes [#I4F1XL](https://gitee.com/openharmony/kernel_liteos_a/issues/I4F1XL)
* 修复重复执行内存用例导致系统卡死问题 ([6c2b163](https://gitee.com/openharmony/kernel_liteos_a/commits/6c2b163c7d7c696ef89b17a0275f3cddb3d7cefb)), closes [#I4F7PO](https://gitee.com/openharmony/kernel_liteos_a/issues/I4F7PO)
* 修改MMU模块的注释错误 ([1a8e22d](https://gitee.com/openharmony/kernel_liteos_a/commits/1a8e22dcf15944153e013d004fd7bbf24557a8c7)), closes [#I4KMMJ](https://gitee.com/openharmony/kernel_liteos_a/issues/I4KMMJ)
* 共享内存问题修复 ([9fdb80f](https://gitee.com/openharmony/kernel_liteos_a/commits/9fdb80f85f92d0167a0456455a94fc6f679797ce)), closes [#I47X2Z](https://gitee.com/openharmony/kernel_liteos_a/issues/I47X2Z)
* 内核ERR打印无进程和线程信息不方便问题定位。 ([cb423f8](https://gitee.com/openharmony/kernel_liteos_a/commits/cb423f845462b8cc474c3cba261dadf3943a08ef)), closes [#I4DAKM](https://gitee.com/openharmony/kernel_liteos_a/issues/I4DAKM)
* 内核ERR级别及以上的打印输出当前进程和线程名 ([540b201](https://gitee.com/openharmony/kernel_liteos_a/commits/540b2017c5460e300365d2039a08abd5945cec6b))
* 内源检视测试用例问题修复 ([a6ac759](https://gitee.com/openharmony/kernel_liteos_a/commits/a6ac7597f85043ba6de3a1b395ca676d85c65ea7))
* 删除冗余的头文件 ([8e614bb](https://gitee.com/openharmony/kernel_liteos_a/commits/8e614bb1616b75bc89eee7ad7da49b7a9c285b47)), closes [#I4KN63](https://gitee.com/openharmony/kernel_liteos_a/issues/I4KN63)
* 增加pselect SYSCALL函数及测试用例 ([f601c16](https://gitee.com/openharmony/kernel_liteos_a/commits/f601c16b9e67d531dda51fc18389a53db4360b7b)), closes [#I45](https://gitee.com/openharmony/kernel_liteos_a/issues/I45)
* 增加内核epoll系统调用 ([2251b8a](https://gitee.com/openharmony/kernel_liteos_a/commits/2251b8a2d1f649422dd67f8551b085a7e0c63ec7)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_a/issues/I4)
* 实现了musl库net模块中的一些函数接口和相应的测试用例 ([3d00a7d](https://gitee.com/openharmony/kernel_liteos_a/commits/3d00a7d23a96f29c138cfc1672825b90b9e0c05e)), closes [#I4JQI1](https://gitee.com/openharmony/kernel_liteos_a/issues/I4JQI1)
* 添加进程线程冒烟用例 ([2be5968](https://gitee.com/openharmony/kernel_liteos_a/commits/2be59680f2fb0801b43522cd38cc387c8ff38766)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_a/issues/I4)
* 用户态进程主线程退出时,其他子线程刚好进入异常处理流程会导致系统卡死 ([d955790](https://gitee.com/openharmony/kernel_liteos_a/commits/d955790a44a679421798ec1ac2900b4d75dd75a4)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_a/issues/I4)
* 增加pselect SYSCALL函数及测试用例 ([f601c16](https://gitee.com/openharmony/kernel_liteos_a/commits/f601c16b9e67d531dda51fc18389a53db4360b7b)), closes [#I45SXU](https://gitee.com/openharmony/kernel_liteos_a/issues/I45SXU)
* 增加内核epoll系统调用 ([2251b8a](https://gitee.com/openharmony/kernel_liteos_a/commits/2251b8a2d1f649422dd67f8551b085a7e0c63ec7)), closes [#I4FXPT](https://gitee.com/openharmony/kernel_liteos_a/issues/I4FXPT)
* 实现了musl库net模块中的一些函数接口和相应的测试用例 ([3d00a7d](https://gitee.com/openharmony/kernel_liteos_a/commits/3d00a7d23a96f29c138cfc1672825b90b9e0c05e)), closes [#I4JQI1](https://gitee.com/openharmony/third_party_musl/issues/I4JQI1)
* 添加进程线程冒烟用例 ([2be5968](https://gitee.com/openharmony/kernel_liteos_a/commits/2be59680f2fb0801b43522cd38cc387c8ff38766)), closes [#I4EOGA](https://gitee.com/openharmony/kernel_liteos_a/issues/I4EOGA)
* 用户态进程主线程退出时,其他子线程刚好进入异常处理流程会导致系统卡死 ([d955790](https://gitee.com/openharmony/kernel_liteos_a/commits/d955790a44a679421798ec1ac2900b4d75dd75a4)), closes [#I4KGBT](https://gitee.com/openharmony/kernel_liteos_a/issues/I4KGBT)
* 编码规范修改 ([d161a0b](https://gitee.com/openharmony/kernel_liteos_a/commits/d161a0b03de046c05fff45a2b625631b4e45a347))
* 编码规范问题修复 ([f60bc94](https://gitee.com/openharmony/kernel_liteos_a/commits/f60bc94cf231bc615ff6603ca0393b8fe33a8c47))
* 编译框架在做编译入口的统一 ([bdb9864](https://gitee.com/openharmony/kernel_liteos_a/commits/bdb9864436a6f128a4c3891bbd63e3c60352689f)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_a/issues/I4)
* 解决dmesg -s参数double lock问题 ([e151256](https://gitee.com/openharmony/kernel_liteos_a/commits/e1512566e322eb1fbc8f5d5997f9bfcd022feac7)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_a/issues/I4)
* 进程退出前自己回收vmspace中的所有region ([298ccea](https://gitee.com/openharmony/kernel_liteos_a/commits/298ccea3fedaccc651b38973f0455fa1ce12e516)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_a/issues/I4)
* 编译框架在做编译入口的统一 ([bdb9864](https://gitee.com/openharmony/kernel_liteos_a/commits/bdb9864436a6f128a4c3891bbd63e3c60352689f)), closes [#I4KRQN](https://gitee.com/openharmony/kernel_liteos_a/issues/I4KRQN)
* 解决dmesg -s参数double lock问题 ([e151256](https://gitee.com/openharmony/kernel_liteos_a/commits/e1512566e322eb1fbc8f5d5997f9bfcd022feac7)), closes [#I4HIJK](https://gitee.com/openharmony/kernel_liteos_a/issues/I4HIJK)
* 进程退出前自己回收vmspace中的所有region ([298ccea](https://gitee.com/openharmony/kernel_liteos_a/commits/298ccea3fedaccc651b38973f0455fa1ce12e516)), closes [#I4CKQC](https://gitee.com/openharmony/kernel_liteos_a/issues/I4CKQC)
* 通过g_uart_fputc_en关闭打印后shell进程不能正常启动 ([d21b05c](https://gitee.com/openharmony/kernel_liteos_a/commits/d21b05c0f69877130366ad37b852a0f30c11809d)), closes [#I4CTY2](https://gitee.com/openharmony/kernel_liteos_a/issues/I4CTY2)
* 针对pr是否同步至release分支增加原因说明规则 ([b37a7b7](https://gitee.com/openharmony/kernel_liteos_a/commits/b37a7b79292d93dae6c4914952b5f3bb509e8721))
* 非当前进程销毁时销毁liteipc时错误的销毁了当前进程的liteipc资源 ([0f0e85b](https://gitee.com/openharmony/kernel_liteos_a/commits/0f0e85b7a6bf76d540925fbf661c483c8dba1cba)), closes [#I4FSA7](https://gitee.com/openharmony/kernel_liteos_a/issues/I4FSA7)
@@ -79,22 +79,22 @@
### Features
* add option SIOCGIFBRDADDR for ioctl ([4ecc473](https://gitee.com/openharmony/kernel_liteos_a/commits/4ecc473843207d259613d26b8ee176d75e7f00fd)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_a/issues/I4)
* add sync() to vfs ([f67c4da](https://gitee.com/openharmony/kernel_liteos_a/commits/f67c4dae5141914df2e069dce0196b14780649d8)), closes [#I480](https://gitee.com/openharmony/kernel_liteos_a/issues/I480)
* add option SIOCGIFBRDADDR for ioctl ([4ecc473](https://gitee.com/openharmony/kernel_liteos_a/commits/4ecc473843207d259613d26b8ee176d75e7f00fd)), closes [#I4DNRF](https://gitee.com/openharmony/kernel_liteos_a/issues/I4DNRF)
* add sync() to vfs ([f67c4da](https://gitee.com/openharmony/kernel_liteos_a/commits/f67c4dae5141914df2e069dce0196b14780649d8)), closes [#I480HV](https://gitee.com/openharmony/kernel_liteos_a/issues/I480HV)
* **build:** support gcc toolchain ([6e886d4](https://gitee.com/openharmony/kernel_liteos_a/commits/6e886d4233dec3b82a27642f174b920e5f98f6aa))
* L0-L1 支持Perf ([6e0a3f1](https://gitee.com/openharmony/kernel_liteos_a/commits/6e0a3f10bbbfe29d110c050da927684b6d77b961)), closes [#I47I9](https://gitee.com/openharmony/kernel_liteos_a/issues/I47I9)
* L0~L1 支持Lms ([e748fdb](https://gitee.com/openharmony/kernel_liteos_a/commits/e748fdbe578a1ddd8eb10b2e207042676231ba26)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_a/issues/I4)
* liteipc 静态内存优化 ([5237924](https://gitee.com/openharmony/kernel_liteos_a/commits/52379242c109e0cf442784dbe811ff9d42d5f33a)), closes [#I4G4](https://gitee.com/openharmony/kernel_liteos_a/issues/I4G4)
* page cache backed by vnode instead of filep ([38a6b80](https://gitee.com/openharmony/kernel_liteos_a/commits/38a6b804e9291d2fdbd189825ebd7d56165ec51c)), closes [#I44](https://gitee.com/openharmony/kernel_liteos_a/issues/I44)
* L0-L1 支持Perf ([6e0a3f1](https://gitee.com/openharmony/kernel_liteos_a/commits/6e0a3f10bbbfe29d110c050da927684b6d77b961)), closes [#I47I9A](https://gitee.com/openharmony/kernel_liteos_a/issues/I47I9A)
* L0~L1 支持Lms ([e748fdb](https://gitee.com/openharmony/kernel_liteos_a/commits/e748fdbe578a1ddd8eb10b2e207042676231ba26)), closes [#I4HYAV](https://gitee.com/openharmony/kernel_liteos_a/issues/I4HYAV)
* liteipc 静态内存优化 ([5237924](https://gitee.com/openharmony/kernel_liteos_a/commits/52379242c109e0cf442784dbe811ff9d42d5f33a)), closes [#I4G4HP](https://gitee.com/openharmony/kernel_liteos_a/issues/I4G4HP)
* page cache backed by vnode instead of filep ([38a6b80](https://gitee.com/openharmony/kernel_liteos_a/commits/38a6b804e9291d2fdbd189825ebd7d56165ec51c)), closes [#I44TBS](https://gitee.com/openharmony/kernel_liteos_a/issues/I44TBS)
* 提供低功耗默认处理框架 ([212d1bd](https://gitee.com/openharmony/kernel_liteos_a/commits/212d1bd1e806530fe7e7a16ea986cb2c6fb084ed)), closes [#I4KBG9](https://gitee.com/openharmony/kernel_liteos_a/issues/I4KBG9)
* 支持AT_RANDOM以增强用户态栈保护能力 ([06ea037](https://gitee.com/openharmony/kernel_liteos_a/commits/06ea03715f0cfb8728fadd0d9c19a403dc8f6028)), closes [#I4CB8](https://gitee.com/openharmony/kernel_liteos_a/issues/I4CB8)
* 支持L1 低功耗框架 ([64e49ab](https://gitee.com/openharmony/kernel_liteos_a/commits/64e49aba7c9c7d2280c5b3f29f04b17b63209855)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_a/issues/I4)
* 支持LOS_TaskJoin 和 LOS_TaskDetach ([37bc11f](https://gitee.com/openharmony/kernel_liteos_a/commits/37bc11fa8837a3019a0a56702f401ec1845f6547)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_a/issues/I4)
* 新增解析异常和backtrace信息脚本 ([7019fdf](https://gitee.com/openharmony/kernel_liteos_a/commits/7019fdfcbb33c660e8aa9fd399d5fccbd7e23b49)), closes [#I47](https://gitee.com/openharmony/kernel_liteos_a/issues/I47)
* 支持AT_RANDOM以增强用户态栈保护能力 ([06ea037](https://gitee.com/openharmony/kernel_liteos_a/commits/06ea03715f0cfb8728fadd0d9c19a403dc8f6028)), closes [#I4CB8M](https://gitee.com/openharmony/kernel_liteos_a/issues/I4CB8M)
* 支持L1 低功耗框架 ([64e49ab](https://gitee.com/openharmony/kernel_liteos_a/commits/64e49aba7c9c7d2280c5b3f29f04b17b63209855)), closes [#I4JSOT](https://gitee.com/openharmony/kernel_liteos_a/issues/I4JSOT)
* 支持LOS_TaskJoin 和 LOS_TaskDetach ([37bc11f](https://gitee.com/openharmony/kernel_liteos_a/commits/37bc11fa8837a3019a0a56702f401ec1845f6547)), closes [#I4EENF](https://gitee.com/openharmony/kernel_liteos_a/issues/I4EENF)
* 新增解析异常和backtrace信息脚本 ([7019fdf](https://gitee.com/openharmony/kernel_liteos_a/commits/7019fdfcbb33c660e8aa9fd399d5fccbd7e23b49)), closes [#I47EVQ](https://gitee.com/openharmony/kernel_liteos_a/issues/I47EVQ)
* 调度tick响应时间计算优化 ([f47da44](https://gitee.com/openharmony/kernel_liteos_a/commits/f47da44b39be7fa3e9b5031d7b79b9bef1fd4fbc))
* 调度去进程化,优化进程线程依赖关系 ([dc479fb](https://gitee.com/openharmony/kernel_liteos_a/commits/dc479fb7bd9cb8441e4e47d44b42110ea07d76a2))
* 调度相关模块间依赖优化 ([0e3936c](https://gitee.com/openharmony/kernel_liteos_a/commits/0e3936c4f8b8bcfc48d283a6d53413e0fc0619b3)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_a/issues/I4)
* 进程cpup占用率结构优化为动态分配 ([f06e090](https://gitee.com/openharmony/kernel_liteos_a/commits/f06e090a1085a654fd726fbc3c3a1c2bc703d663)), closes [#I4](https://gitee.com/openharmony/kernel_liteos_a/issues/I4)
* 调度相关模块间依赖优化 ([0e3936c](https://gitee.com/openharmony/kernel_liteos_a/commits/0e3936c4f8b8bcfc48d283a6d53413e0fc0619b3)), closes [#I4RPRW](https://gitee.com/openharmony/kernel_liteos_a/issues/I4RPRW)
* 进程cpup占用率结构优化为动态分配 ([f06e090](https://gitee.com/openharmony/kernel_liteos_a/commits/f06e090a1085a654fd726fbc3c3a1c2bc703d663)), closes [#I4GLNT](https://gitee.com/openharmony/kernel_liteos_a/issues/I4GLNT)
* 进程rlimit修改为动态分配,减少静态内存占用 ([cf8446c](https://gitee.com/openharmony/kernel_liteos_a/commits/cf8446c94112ed6993a2e6e71e793d83a72689d5)), closes [#I4EZY5](https://gitee.com/openharmony/kernel_liteos_a/issues/I4EZY5)
### BREAKING CHANGES
@@ -137,33 +137,33 @@ LOS_LmsAddrDisableProtect去能指定内存段的访问保护
### Bug Fixes
* A核代码告警清零 ([698756d](https://gitee.com/openharmony/kernel_liteos_a/commits/698756d1e6dfb11b9f874c02ce6a1496646f2c27)), closes [#I4378](https://gitee.com/openharmony/kernel_liteos_a/issues/I4378)
* A核代码告警清零 ([698756d](https://gitee.com/openharmony/kernel_liteos_a/commits/698756d1e6dfb11b9f874c02ce6a1496646f2c27)), closes [#I4378T](https://gitee.com/openharmony/kernel_liteos_a/issues/I4378T)
* A核告警消除 ([d16bfd0](https://gitee.com/openharmony/kernel_liteos_a/commits/d16bfd005a6dae78df2df3ad55cf21e0716dfae9)), closes [#I46KF6](https://gitee.com/openharmony/kernel_liteos_a/issues/I46KF6)
* 3518平台, 异常测试进程无法正常退出 ([23937a2](https://gitee.com/openharmony/kernel_liteos_a/commits/23937a239f50d1487e89f3184e4f4b933d6842c6)), closes [#I3V8R5](https://gitee.com/openharmony/kernel_liteos_a/issues/I3V8R5)
* add (void) to GetFileMappingList method ([56b8eca](https://gitee.com/openharmony/kernel_liteos_a/commits/56b8ecaf171671c0fe97f1dd1f191bebb7812a51)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* add (void) to GetFileMappingList method ([56b8eca](https://gitee.com/openharmony/kernel_liteos_a/commits/56b8ecaf171671c0fe97f1dd1f191bebb7812a51)), closes [#I3XPXY](https://gitee.com/openharmony/kernel_liteos_a/issues/I3XPXY)
* add capability and amend smoke testcase ([c9d69e2](https://gitee.com/openharmony/kernel_liteos_a/commits/c9d69e2d1bde57c67068cc36f6a79327d5db5daf))
* add fchdir api ([e828cbd](https://gitee.com/openharmony/kernel_liteos_a/commits/e828cbdeac7d60bfd6ed98c75a9958ee8ec7b672))
* add fchmod api ([2f214bf](https://gitee.com/openharmony/kernel_liteos_a/commits/2f214bf4de6c31875c77e84b1763e96bc5ceb669))
* add fststfs api and unitest ([4c57aa2](https://gitee.com/openharmony/kernel_liteos_a/commits/4c57aa26ad3644ce2429effc8e8fe7fd3c52ebc2))
* add product_path parameter for driver build ([88fe4eb](https://gitee.com/openharmony/kernel_liteos_a/commits/88fe4eb3e1eafa6d1e32c7b96579a07f5a8c6e35)), closes [#I3PQ10](https://gitee.com/openharmony/kernel_liteos_a/issues/I3PQ10)
* add product_path parameter for driver build ([88fe4eb](https://gitee.com/openharmony/kernel_liteos_a/commits/88fe4eb3e1eafa6d1e32c7b96579a07f5a8c6e35)), closes [#I3PQ10](https://gitee.com/openharmony/drivers_adapter/issues/I3PQ10)
* add syscall for ppoll & add 2 testcases ([defedb6](https://gitee.com/openharmony/kernel_liteos_a/commits/defedb6fdf0806da4a39e22408544cdfb405f2ff))
* avoid compile warning ignored ([eca711b](https://gitee.com/openharmony/kernel_liteos_a/commits/eca711bb64a7c806ae34c8483cac73fe22b0104f)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* A核codex修改 ([ec977a1](https://gitee.com/openharmony/kernel_liteos_a/commits/ec977a1c7e9ba4ea6621ceb1d0d10e586148208d)), closes [#I40B1](https://gitee.com/openharmony/kernel_liteos_a/issues/I40B1)
* BBOX使用预留物理内存缓存故障日志 ([2ad176e](https://gitee.com/openharmony/kernel_liteos_a/commits/2ad176e587d5ed7106831a25d386a88e26192e2b)), closes [#I41](https://gitee.com/openharmony/kernel_liteos_a/issues/I41)
* avoid compile warning ignored ([eca711b](https://gitee.com/openharmony/kernel_liteos_a/commits/eca711bb64a7c806ae34c8483cac73fe22b0104f)), closes [#I3VOAO](https://gitee.com/openharmony/kernel_liteos_a/issues/I3VOAO)
* A核codex修改 ([ec977a1](https://gitee.com/openharmony/kernel_liteos_a/commits/ec977a1c7e9ba4ea6621ceb1d0d10e586148208d)), closes [#I40B1S](https://gitee.com/openharmony/kernel_liteos_a/issues/I40B1S)
* BBOX使用预留物理内存缓存故障日志 ([2ad176e](https://gitee.com/openharmony/kernel_liteos_a/commits/2ad176e587d5ed7106831a25d386a88e26192e2b)), closes [#I41YIZ](https://gitee.com/openharmony/kernel_liteos_a/issues/I41YIZ)
* bootargs解析与rootfs挂载解耦并支持自定义bootargs参数 ([80473f0](https://gitee.com/openharmony/kernel_liteos_a/commits/80473f0975fe6fd4c4eae3a8a473674ad2dd1293)), closes [#I41CL8](https://gitee.com/openharmony/kernel_liteos_a/issues/I41CL8)
* **build:** clang10.0.1支持lto去掉冗余判断 ([73223ae](https://gitee.com/openharmony/kernel_liteos_a/commits/73223ae7e652b7cd9f1e1848c32b2b2573d07b2a))
* **build:** fix rootfsdir.sh target directory not exist ([21bf2b8](https://gitee.com/openharmony/kernel_liteos_a/commits/21bf2b889931787fb18ca7ea238291fd57e76d51)), closes [#I3NHQ0](https://gitee.com/openharmony/kernel_liteos_a/issues/I3NHQ0)
* **build:** 去除冗余单板相关的宏配置 ([471de36](https://gitee.com/openharmony/kernel_liteos_a/commits/471de3663ea8b63f7448162edc0293b8723dcefc))
* clang10 lld could not recognized Oz ([87a0006](https://gitee.com/openharmony/kernel_liteos_a/commits/87a0006d5e1976fdf5efe4be383921610eb04ec6))
* clang相关编译选项隔离 ([77dcef4](https://gitee.com/openharmony/kernel_liteos_a/commits/77dcef4bc0c92d0141f7a3be0addd4d5cb533b0b)), closes [#I444](https://gitee.com/openharmony/kernel_liteos_a/issues/I444)
* clang相关编译选项隔离 ([77dcef4](https://gitee.com/openharmony/kernel_liteos_a/commits/77dcef4bc0c92d0141f7a3be0addd4d5cb533b0b)), closes [#I444AV](https://gitee.com/openharmony/kernel_liteos_a/issues/I444AV)
* codex ([101a55d](https://gitee.com/openharmony/kernel_liteos_a/commits/101a55d1199530d621f809976f0024aa8295cce8))
* codex clean ([b5370af](https://gitee.com/openharmony/kernel_liteos_a/commits/b5370af822c8e81ed2248ac8aa3bb479a0db9dae)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* codex clean ([b5370af](https://gitee.com/openharmony/kernel_liteos_a/commits/b5370af822c8e81ed2248ac8aa3bb479a0db9dae)), closes [#I3UOFN](https://gitee.com/openharmony/kernel_liteos_a/issues/I3UOFN)
* compile error when fatfs disabled ([fd3f407](https://gitee.com/openharmony/kernel_liteos_a/commits/fd3f4072b5c3dff710013ccdaddf114b0e13f435))
* console compile bug fix ([f8441a0](https://gitee.com/openharmony/kernel_liteos_a/commits/f8441a0cdea301449416b0c0477dc48a05b6ab4e))
* correct spelling ([c66fe03](https://gitee.com/openharmony/kernel_liteos_a/commits/c66fe0313f76ba41992b4864c93cf82934378ad3))
* Correctly handle the return value of LOS_EventRead in QuickstartListen. ([0e0ab81](https://gitee.com/openharmony/kernel_liteos_a/commits/0e0ab81ff9474cffd5e60a8ee741840eac5d737b)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* Correctly handle the return value of LOS_EventRead in QuickstartListen. ([0e0ab81](https://gitee.com/openharmony/kernel_liteos_a/commits/0e0ab81ff9474cffd5e60a8ee741840eac5d737b)), closes [#I3PSLZ](https://gitee.com/openharmony/kernel_liteos_a/issues/I3PSLZ)
* Ctrl-C move out of LOS_MAGIC_KEY_ENABLE ([40f239a](https://gitee.com/openharmony/kernel_liteos_a/commits/40f239a7d4673dc740c853b1011b5072e48385b7))
* Delete useless 'exc interaction' macros and function declarations. ([d2f2679](https://gitee.com/openharmony/kernel_liteos_a/commits/d2f26790716c9f76589c4a7d6fa5518f9ccd743c)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* Delete useless 'exc interaction' macros and function declarations. ([d2f2679](https://gitee.com/openharmony/kernel_liteos_a/commits/d2f26790716c9f76589c4a7d6fa5518f9ccd743c)), closes [#I3SDKY](https://gitee.com/openharmony/kernel_liteos_a/issues/I3SDKY)
* dereference NULL point bug fix ([deaa564](https://gitee.com/openharmony/kernel_liteos_a/commits/deaa564a66b83c9fe19a37b8a061ec9064ece354))
* do not build toybox temporarily ([044f2c7](https://gitee.com/openharmony/kernel_liteos_a/commits/044f2c7c17c68e10aeccc3af0c222cfc722d194c))
* do not override existing libs ([8118408](https://gitee.com/openharmony/kernel_liteos_a/commits/8118408123e75f7f5a4ab9101e388be6bba0dcda))
@@ -173,21 +173,21 @@ LOS_LmsAddrDisableProtect去能指定内存段的访问保护
* Fix kernel page fault exception handling causing system exception. ([a89fb57](https://gitee.com/openharmony/kernel_liteos_a/commits/a89fb57f5795236b93fd19ee2d7a059cae1b2b1b)), closes [#I3RAN4](https://gitee.com/openharmony/kernel_liteos_a/issues/I3RAN4)
* fix length typo ([12d98b1](https://gitee.com/openharmony/kernel_liteos_a/commits/12d98b144b70e726d3fd31ddc9d17ed855d0ec1b))
* fix mq function by enable mq_notify api ([4427142](https://gitee.com/openharmony/kernel_liteos_a/commits/4427142d734df8f95f4599093392904abacc5c93))
* Fix quickstart codingstyle ([2e011b6](https://gitee.com/openharmony/kernel_liteos_a/commits/2e011b672f6b96ea7e0db066a07e3f9fb6ba5df3)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* Fix quickstart codingstyle ([2e011b6](https://gitee.com/openharmony/kernel_liteos_a/commits/2e011b672f6b96ea7e0db066a07e3f9fb6ba5df3)), closes [#I3OPOM](https://gitee.com/openharmony/kernel_liteos_a/issues/I3OPOM)
* fix stored typo ([d25560f](https://gitee.com/openharmony/kernel_liteos_a/commits/d25560f8ac3216670d198cbbb25891c394e0b3c2))
* fix syscall faccessat,fstatfs,fstatat & add 6 testcases ([aa1cd24](https://gitee.com/openharmony/kernel_liteos_a/commits/aa1cd245a5711e5b53c328b688da5ddc2e783d5f))
* fix the inappropriate errno in FatFs ([af61187](https://gitee.com/openharmony/kernel_liteos_a/commits/af61187587411dca38ff62e720451f08f19c1c82)), closes [#I3O8](https://gitee.com/openharmony/kernel_liteos_a/issues/I3O8)
* fix the inappropriate errno in FatFs ([af61187](https://gitee.com/openharmony/kernel_liteos_a/commits/af61187587411dca38ff62e720451f08f19c1c82)), closes [#I3O8IF](https://gitee.com/openharmony/kernel_liteos_a/issues/I3O8IF)
* fix typo in quickstart ([3b2ff4b](https://gitee.com/openharmony/kernel_liteos_a/commits/3b2ff4b71fc5ae1dc74180c33fd66f69da0059d1)), closes [#I3M1S8](https://gitee.com/openharmony/kernel_liteos_a/issues/I3M1S8)
* Fix wrong judgment in los_trace.c to avoid null pointer access. ([4d863e9](https://gitee.com/openharmony/kernel_liteos_a/commits/4d863e985b6372f7895db57b602b662dba5cadd0)), closes [#I3RT9](https://gitee.com/openharmony/kernel_liteos_a/issues/I3RT9)
* Fix wrong judgment in los_trace.c to avoid null pointer access. ([4d863e9](https://gitee.com/openharmony/kernel_liteos_a/commits/4d863e985b6372f7895db57b602b662dba5cadd0)), closes [#I3RT9F](https://gitee.com/openharmony/kernel_liteos_a/issues/I3RT9F)
* Identical condition 'ret<0', second condition is always false. :bug: ([1348809](https://gitee.com/openharmony/kernel_liteos_a/commits/1348809807548dd481286a55a6677a9169fcd705))
* init进程收到子进程退出信号后调用fork重新拉起进程会导致系统卡死 ([35a2f3a](https://gitee.com/openharmony/kernel_liteos_a/commits/35a2f3af33a5dba1e0ba36587efced8fead97223)), closes [#I41](https://gitee.com/openharmony/kernel_liteos_a/issues/I41)
* init进程收到子进程退出信号后调用fork重新拉起进程会导致系统卡死 ([35a2f3a](https://gitee.com/openharmony/kernel_liteos_a/commits/35a2f3af33a5dba1e0ba36587efced8fead97223)), closes [#I41HOY](https://gitee.com/openharmony/kernel_liteos_a/issues/I41HOY)
* kernel crashed after rmdir the umounted folder ([ac0d083](https://gitee.com/openharmony/kernel_liteos_a/commits/ac0d083b1c89c4ad3fdaab0347d11f174d0185cb))
* kernel crashed when delete a umounted folder ([f305d1f](https://gitee.com/openharmony/kernel_liteos_a/commits/f305d1f702a770010125a0f4f0152ffefeeec5c4))
* kernel crashed when delete a umounted folder ([c6e9212](https://gitee.com/openharmony/kernel_liteos_a/commits/c6e921241b1cf26bcbfeea44e20f6b596512e259))
* **kernel_test:** 内核mem/shm冒烟用例重复运行失败 ([0676578](https://gitee.com/openharmony/kernel_liteos_a/commits/0676578aae09c101d79e7a276823e849df293e29)), closes [#I3TH4](https://gitee.com/openharmony/kernel_liteos_a/issues/I3TH4)
* L1 toybox 命令功能实现 ([2ff44c4](https://gitee.com/openharmony/kernel_liteos_a/commits/2ff44c4938d2e66ce60e9497c505eb6e97efc8c2)), closes [#I41N2](https://gitee.com/openharmony/kernel_liteos_a/issues/I41N2)
* **kernel_test:** 内核mem/shm冒烟用例重复运行失败 ([0676578](https://gitee.com/openharmony/kernel_liteos_a/commits/0676578aae09c101d79e7a276823e849df293e29)), closes [#I3TH4W](https://gitee.com/openharmony/kernel_liteos_a/issues/I3TH4W)
* L1 toybox 命令功能实现 ([2ff44c4](https://gitee.com/openharmony/kernel_liteos_a/commits/2ff44c4938d2e66ce60e9497c505eb6e97efc8c2)), closes [#I41N2A](https://gitee.com/openharmony/third_party_toybox/issues/I41N2A)
* liteipc max data size too small ([4dc421e](https://gitee.com/openharmony/kernel_liteos_a/commits/4dc421e3decdaae60219d533c4a93dbc9334e35f))
* LiteOS_A BBOX Codex整改 ([6a5a032](https://gitee.com/openharmony/kernel_liteos_a/commits/6a5a0326d2b18ffacce5d38fb351530973c2f245)), closes [#I43](https://gitee.com/openharmony/kernel_liteos_a/issues/I43)
* LiteOS_A BBOX Codex整改 ([6a5a032](https://gitee.com/openharmony/kernel_liteos_a/commits/6a5a0326d2b18ffacce5d38fb351530973c2f245)), closes [#I43RQU](https://gitee.com/openharmony/kernel_liteos_a/issues/I43RQU)
* Liteos-a创建的文件夹在Ubuntu中不可见 ([a9fc1e0](https://gitee.com/openharmony/kernel_liteos_a/commits/a9fc1e0e5d3e5eb8a34c568a8d147320a9afebe1)), closes [#I3XMY6](https://gitee.com/openharmony/kernel_liteos_a/issues/I3XMY6)
* lookup new vnode may cause parent vnode freeing ([902a11d](https://gitee.com/openharmony/kernel_liteos_a/commits/902a11de9a4b08e799820fb87942cb2171b9e095)), closes [#I3MYP4](https://gitee.com/openharmony/kernel_liteos_a/issues/I3MYP4)
* **mini:** fix compile error in mini liteos_a ([e13cb3b](https://gitee.com/openharmony/kernel_liteos_a/commits/e13cb3bcc4e74d4c49c31d290d686f99a4e81e3f))
@@ -196,117 +196,117 @@ LOS_LmsAddrDisableProtect去能指定内存段的访问保护
* mkdir -p is more robust ([e38f9a9](https://gitee.com/openharmony/kernel_liteos_a/commits/e38f9a98c9d373db8381af707c5996d1fefef64e))
* mksh compile bug fix ([d8263b1](https://gitee.com/openharmony/kernel_liteos_a/commits/d8263b1e91d76706d52df321ef642c1c8297e8e4)), closes [#I3ZMR7](https://gitee.com/openharmony/kernel_liteos_a/issues/I3ZMR7)
* modify event API description ([937734b](https://gitee.com/openharmony/kernel_liteos_a/commits/937734b1e9f5fc52e0ac727549bd2e4b4c864e3c))
* move nuttx head file back ([4c8a86e](https://gitee.com/openharmony/kernel_liteos_a/commits/4c8a86ece7cafa8f74441bacc74c7788c0a1b780)), closes [#I4443](https://gitee.com/openharmony/kernel_liteos_a/issues/I4443)
* nanosleep 接口的rmtp参数被错误清零 ([9458de9](https://gitee.com/openharmony/kernel_liteos_a/commits/9458de9ac664cd75540c8b638b9a6caf82812fc8)), closes [#I41U0](https://gitee.com/openharmony/kernel_liteos_a/issues/I41U0)
* move nuttx head file back ([4c8a86e](https://gitee.com/openharmony/kernel_liteos_a/commits/4c8a86ece7cafa8f74441bacc74c7788c0a1b780)), closes [#I4443Q](https://gitee.com/openharmony/kernel_liteos_a/issues/I4443Q)
* nanosleep 接口的rmtp参数被错误清零 ([9458de9](https://gitee.com/openharmony/kernel_liteos_a/commits/9458de9ac664cd75540c8b638b9a6caf82812fc8)), closes [#I41U0R](https://gitee.com/openharmony/kernel_liteos_a/issues/I41U0R)
* no exception information output, when the system is abnormal ([5bf4d1c](https://gitee.com/openharmony/kernel_liteos_a/commits/5bf4d1c7128e6718611bbec23cb4373bcb3bfe55))
* no exception information output, when the system is abnormal ([28aa777](https://gitee.com/openharmony/kernel_liteos_a/commits/28aa777191e7b41e4f1f346ab79f8688edc59c6d))
* no exception information output, when the system is abnormal after holding ([0ed8adf](https://gitee.com/openharmony/kernel_liteos_a/commits/0ed8adfe3ae59672e284331d40ef3b9e0bc8e094))
* Optimiz macro of quickstart cmd ([cb140a4](https://gitee.com/openharmony/kernel_liteos_a/commits/cb140a4442c02dd0b1925cc58deecbf4da36dcea)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* Optimize /dev/quickstart permissions. ([4e24b57](https://gitee.com/openharmony/kernel_liteos_a/commits/4e24b572897c33e1b2723122c0e13d3931096bae)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* Optimiz macro of quickstart cmd ([cb140a4](https://gitee.com/openharmony/kernel_liteos_a/commits/cb140a4442c02dd0b1925cc58deecbf4da36dcea)), closes [#I3OSYT](https://gitee.com/openharmony/kernel_liteos_a/issues/I3OSYT)
* Optimize /dev/quickstart permissions. ([4e24b57](https://gitee.com/openharmony/kernel_liteos_a/commits/4e24b572897c33e1b2723122c0e13d3931096bae)), closes [#I3OYUQ](https://gitee.com/openharmony/kernel_liteos_a/issues/I3OYUQ)
* Optimize quickstart node implementation ([4abd2e0](https://gitee.com/openharmony/kernel_liteos_a/commits/4abd2e0247b14718bb21756fb446142140d30a88)), closes [#I3R8O8](https://gitee.com/openharmony/kernel_liteos_a/issues/I3R8O8)
* OsGerCurrSchedTimeCycle 函数存在拼写错误 ([53ced1a](https://gitee.com/openharmony/kernel_liteos_a/commits/53ced1a85edc3d06230225ced3916772f432243f)), closes [#I446](https://gitee.com/openharmony/kernel_liteos_a/issues/I446)
* OsGetArgsAddr声明所在头文件不正确 ([14bd753](https://gitee.com/openharmony/kernel_liteos_a/commits/14bd753aa8beb49af887c8d0aedaefa446409760)), closes [#I41](https://gitee.com/openharmony/kernel_liteos_a/issues/I41)
* parent point of vnode found by VfsHashGet should be updated ([f32caa5](https://gitee.com/openharmony/kernel_liteos_a/commits/f32caa52c67eca20d58676be4e0439acbb4c5ac3)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* OsGerCurrSchedTimeCycle 函数存在拼写错误 ([53ced1a](https://gitee.com/openharmony/kernel_liteos_a/commits/53ced1a85edc3d06230225ced3916772f432243f)), closes [#I446CX](https://gitee.com/openharmony/kernel_liteos_a/issues/I446CX)
* OsGetArgsAddr声明所在头文件不正确 ([14bd753](https://gitee.com/openharmony/kernel_liteos_a/commits/14bd753aa8beb49af887c8d0aedaefa446409760)), closes [#I41MWM](https://gitee.com/openharmony/kernel_liteos_a/issues/I41MWM)
* parent point of vnode found by VfsHashGet should be updated ([f32caa5](https://gitee.com/openharmony/kernel_liteos_a/commits/f32caa52c67eca20d58676be4e0439acbb4c5ac3)), closes [#I3NNFA](https://gitee.com/openharmony/kernel_liteos_a/issues/I3NNFA)
* PathCacheFree try to free name field in struct PathCache ([9f47faf](https://gitee.com/openharmony/kernel_liteos_a/commits/9f47faff732609cf2249f104b94ed55f3ef133bb)), closes [#I3NTH9](https://gitee.com/openharmony/kernel_liteos_a/issues/I3NTH9)
* PathCacheMemoryDump miscalculate the RAM usage of PathCache ([87da7c7](https://gitee.com/openharmony/kernel_liteos_a/commits/87da7c794c9bc8e311ae5242820fbf8aefd8d558)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* PathCacheMemoryDump miscalculate the RAM usage of PathCache ([87da7c7](https://gitee.com/openharmony/kernel_liteos_a/commits/87da7c794c9bc8e311ae5242820fbf8aefd8d558)), closes [#I3OBXY](https://gitee.com/openharmony/kernel_liteos_a/issues/I3OBXY)
* Provide a separate configuration macro for boot environment in RAM. ([e28e06b](https://gitee.com/openharmony/kernel_liteos_a/commits/e28e06b08f5b28091153e584cb9d93014a9f2b10))
* Provide a separate configuration macro for boot environment in RAM. ([bc67393](https://gitee.com/openharmony/kernel_liteos_a/commits/bc67393a67f714e0a8165b6103e53699c676341c))
* Provide a separate configuration macro for boot environment in RAM. ([f13b90e](https://gitee.com/openharmony/kernel_liteos_a/commits/f13b90e4308ba3d60683799b9ce62fb3705ac277)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* race condition in liteipc ([7e2aef2](https://gitee.com/openharmony/kernel_liteos_a/commits/7e2aef2480b15f71ee0e089cef4443f578e03dbb)), closes [#I3PW5](https://gitee.com/openharmony/kernel_liteos_a/issues/I3PW5)
* Provide a separate configuration macro for boot environment in RAM. ([f13b90e](https://gitee.com/openharmony/kernel_liteos_a/commits/f13b90e4308ba3d60683799b9ce62fb3705ac277)), closes [#I3OADR](https://gitee.com/openharmony/kernel_liteos_a/issues/I3OADR)
* race condition in liteipc ([7e2aef2](https://gitee.com/openharmony/kernel_liteos_a/commits/7e2aef2480b15f71ee0e089cef4443f578e03dbb)), closes [#I3PW5Y](https://gitee.com/openharmony/kernel_liteos_a/issues/I3PW5Y)
* rebuild mksh depends on rebuild.sh script ([bef4ab9](https://gitee.com/openharmony/kernel_liteos_a/commits/bef4ab9835dec865898c74337dfb7154718b94aa))
* remove redundant headfile ([73a7777](https://gitee.com/openharmony/kernel_liteos_a/commits/73a777777e1b834192f6bb2c0e8bd03c69765c11)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* Remove redundant invalid codes ([fe05df4](https://gitee.com/openharmony/kernel_liteos_a/commits/fe05df40ae710632adb1bd54fb04ad4a8e0c1429)), closes [#I3R70](https://gitee.com/openharmony/kernel_liteos_a/issues/I3R70)
* Show conflicting files for git apply or patch -p command ([35f7957](https://gitee.com/openharmony/kernel_liteos_a/commits/35f79579758644cbcac6005f894be21f34f42b99)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* remove redundant headfile ([73a7777](https://gitee.com/openharmony/kernel_liteos_a/commits/73a777777e1b834192f6bb2c0e8bd03c69765c11)), closes [#I3RTNR](https://gitee.com/openharmony/kernel_liteos_a/issues/I3RTNR)
* Remove redundant invalid codes ([fe05df4](https://gitee.com/openharmony/kernel_liteos_a/commits/fe05df40ae710632adb1bd54fb04ad4a8e0c1429)), closes [#I3R70T](https://gitee.com/openharmony/kernel_liteos_a/issues/I3R70T)
* Show conflicting files for git apply or patch -p command ([35f7957](https://gitee.com/openharmony/kernel_liteos_a/commits/35f79579758644cbcac6005f894be21f34f42b99)), closes [#I3NNUS](https://gitee.com/openharmony/kernel_liteos_a/issues/I3NNUS)
* SIOCGIFCONF ioctl malloc size error in kernel ([bfd27e7](https://gitee.com/openharmony/kernel_liteos_a/commits/bfd27e78b259eedbd4c30548e80c9b4d789d26e1)), closes [#I3XEZ3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3XEZ3)
* smp启动代码解耦及内存映射关系解耦 ([3bb3173](https://gitee.com/openharmony/kernel_liteos_a/commits/3bb3173604dc4dea09301f61da402974185dc112)), closes [#I41P8](https://gitee.com/openharmony/kernel_liteos_a/issues/I41P8)
* some branch in format does not release the vnode mutex properly ([9b2b700](https://gitee.com/openharmony/kernel_liteos_a/commits/9b2b700fa0e3a8edadb38f09c917a3e3f013347f)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* smp启动代码解耦及内存映射关系解耦 ([3bb3173](https://gitee.com/openharmony/kernel_liteos_a/commits/3bb3173604dc4dea09301f61da402974185dc112)), closes [#I41P8Y](https://gitee.com/openharmony/kernel_liteos_a/issues/I41P8Y)
* some branch in format does not release the vnode mutex properly ([9b2b700](https://gitee.com/openharmony/kernel_liteos_a/commits/9b2b700fa0e3a8edadb38f09c917a3e3f013347f)), closes [#I3OFAY](https://gitee.com/openharmony/kernel_liteos_a/issues/I3OFAY)
* Sortlink, the response time to insert the node should be inserted into the back of the existing node. ([1323874](https://gitee.com/openharmony/kernel_liteos_a/commits/1323874389030c55fb053fead12ca1c6654d8851)), closes [#I3PSJ8](https://gitee.com/openharmony/kernel_liteos_a/issues/I3PSJ8)
* statfs can't get f_bfree and f_bavail of a FAT12/FAT16 partition ([9503c4a](https://gitee.com/openharmony/kernel_liteos_a/commits/9503c4a9fc30aaa8ea2031d4fb794436f3c98055)), closes [#I3Q0](https://gitee.com/openharmony/kernel_liteos_a/issues/I3Q0)
* SysOpenat返回值应该为进程fd而非系统全局fd。 ([3457c0b](https://gitee.com/openharmony/kernel_liteos_a/commits/3457c0b11debb2cf5d4abe325c2510a750654512)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* the total used vnode number not increased after unlink a file under ([4f514a1](https://gitee.com/openharmony/kernel_liteos_a/commits/4f514a16af5a3f3b9c4ea182de774297afb17f66)), closes [#I3TS1](https://gitee.com/openharmony/kernel_liteos_a/issues/I3TS1)
* tick 动态化计算优化,消除中断执行时间对系统总体时间的影响,保证软件定时器的响应精度。 ([8df3e8c](https://gitee.com/openharmony/kernel_liteos_a/commits/8df3e8c96515a1907455a9bbc61426f43c803c62)), closes [#I43](https://gitee.com/openharmony/kernel_liteos_a/issues/I43)
* statfs can't get f_bfree and f_bavail of a FAT12/FAT16 partition ([9503c4a](https://gitee.com/openharmony/kernel_liteos_a/commits/9503c4a9fc30aaa8ea2031d4fb794436f3c98055)), closes [#I3Q0VS](https://gitee.com/openharmony/kernel_liteos_a/issues/I3Q0VS)
* SysOpenat返回值应该为进程fd而非系统全局fd。 ([3457c0b](https://gitee.com/openharmony/kernel_liteos_a/commits/3457c0b11debb2cf5d4abe325c2510a750654512)), closes [#I3TNAK](https://gitee.com/openharmony/kernel_liteos_a/issues/I3TNAK)
* the total used vnode number not increased after unlink a file under ([4f514a1](https://gitee.com/openharmony/kernel_liteos_a/commits/4f514a16af5a3f3b9c4ea182de774297afb17f66)), closes [#I3TS1Y](https://gitee.com/openharmony/kernel_liteos_a/issues/I3TS1Y)
* tick 动态化计算优化,消除中断执行时间对系统总体时间的影响,保证软件定时器的响应精度。 ([8df3e8c](https://gitee.com/openharmony/kernel_liteos_a/commits/8df3e8c96515a1907455a9bbc61426f43c803c62)), closes [#I43UQJ](https://gitee.com/openharmony/kernel_liteos_a/issues/I43UQJ)
* toybox update ([c3245b3](https://gitee.com/openharmony/kernel_liteos_a/commits/c3245b3ce317eb58c8dad58fdfc7f094b9b9794b))
* toybox命令升级 ([76f45b3](https://gitee.com/openharmony/kernel_liteos_a/commits/76f45b3fb2783d1cab45a6ba08787c29dfa2c948)), closes [#I41N2](https://gitee.com/openharmony/kernel_liteos_a/issues/I41N2)
* toybox命令升级 ([76f45b3](https://gitee.com/openharmony/kernel_liteos_a/commits/76f45b3fb2783d1cab45a6ba08787c29dfa2c948)), closes [#I41N2A](https://gitee.com/openharmony/third_party_toybox/issues/I41N2A)
* update LOS_DL_LIST_IS_END comment ([900269b](https://gitee.com/openharmony/kernel_liteos_a/commits/900269bd4645252d898f6d3b73de01d8548c960c))
* userfs分区的起始地址与大小改为通过bootargs配置 ([2e2b142](https://gitee.com/openharmony/kernel_liteos_a/commits/2e2b14205f4b81c7483ab42d62f144487097e9a4)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* VnodeInUseIter and VnodeFreeAll used to be recursive ([5f6656c](https://gitee.com/openharmony/kernel_liteos_a/commits/5f6656cb36a2ffb0b290aeb53981aba7501e80b2)), closes [#I3NN3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3NN3)
* 以g_sysSchedStartTime是否为0判断时间轴是否生效存在极限场景导致调度时间不生效 ([67ac8c4](https://gitee.com/openharmony/kernel_liteos_a/commits/67ac8c4c586adc371ece56700fd42371ca7fc885)), closes [#I45HP5](https://gitee.com/openharmony/kernel_liteos_a/issues/I45HP5)
* userfs分区的起始地址与大小改为通过bootargs配置 ([2e2b142](https://gitee.com/openharmony/kernel_liteos_a/commits/2e2b14205f4b81c7483ab42d62f144487097e9a4)), closes [#I3XNEY](https://gitee.com/openharmony/kernel_liteos_a/issues/I3XNEY)
* VnodeInUseIter and VnodeFreeAll used to be recursive ([5f6656c](https://gitee.com/openharmony/kernel_liteos_a/commits/5f6656cb36a2ffb0b290aeb53981aba7501e80b2)), closes [#I3NN3U](https://gitee.com/openharmony/kernel_liteos_a/issues/I3NN3U)
* 以g_sysSchedStartTime是否为0判断时间轴是否生效存在极限场景导致调度时间不生效 ([67ac8c4](https://gitee.com/openharmony/kernel_liteos_a/commits/67ac8c4c586adc371ece56700fd42371ca7fc885)), closes [#I45HP5](https://gitee.com/openharmony/kernel_liteos_m/issues/I45HP5)
* 修复FATFS中不同内部接口不支持FAT12/FAT16 FAT表结束标志 ([33f5c70](https://gitee.com/openharmony/kernel_liteos_a/commits/33f5c70e6c8781758d2bfde0f60ca3d6ec7d543f)), closes [#I409R6](https://gitee.com/openharmony/kernel_liteos_a/issues/I409R6)
* 修复kill进程时因liteipc阻塞的进程概率无法退出问题 ([7de43bb](https://gitee.com/openharmony/kernel_liteos_a/commits/7de43bb004a12f926550f0b36ca3c2fa610feb27)), closes [#I3XX7](https://gitee.com/openharmony/kernel_liteos_a/issues/I3XX7)
* 修复kill进程时因liteipc阻塞的进程概率无法退出问题 ([7de43bb](https://gitee.com/openharmony/kernel_liteos_a/commits/7de43bb004a12f926550f0b36ca3c2fa610feb27)), closes [#I3XX7K](https://gitee.com/openharmony/kernel_liteos_a/issues/I3XX7K)
* 修复MagicKey数组越界访问 ([071cd62](https://gitee.com/openharmony/kernel_liteos_a/commits/071cd6268aeaaef702387dacaf4ef1ffbb7618fc)), closes [#I3U4N9](https://gitee.com/openharmony/kernel_liteos_a/issues/I3U4N9)
* 修复mprotect修改地址区间的权限后相应的区间名丢失问题 ([e425187](https://gitee.com/openharmony/kernel_liteos_a/commits/e425187d176a5e09bc5253faefc9cfc8454da0a3)), closes [#I43R40](https://gitee.com/openharmony/kernel_liteos_a/issues/I43R40)
* 修复mq_close关闭后仍然占用文件描述符的问题 ([590c7b4](https://gitee.com/openharmony/kernel_liteos_a/commits/590c7b4e22662781d05ad035a785e985d573ec33)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* 修复mqueue问题 ([26ee8b8](https://gitee.com/openharmony/kernel_liteos_a/commits/26ee8b836e346e641de4ecd72284f5d377bca6f8)), closes [#I43P4](https://gitee.com/openharmony/kernel_liteos_a/issues/I43P4)
* 修复sigwait等待到的信号值与获取的siginfo中的值不一致 ([ed7defb](https://gitee.com/openharmony/kernel_liteos_a/commits/ed7defbd439c345a07159d40eb04433afd530004)), closes [#I3M12](https://gitee.com/openharmony/kernel_liteos_a/issues/I3M12)
* 修复了LOSCFG_FS_FAT_VIRTUAL_PARTITION宏开关错误作用域引起的功能错误 ([acda419](https://gitee.com/openharmony/kernel_liteos_a/commits/acda419a2d773ea890052a16ee66b4872f941fbb)), closes [#I3W1](https://gitee.com/openharmony/kernel_liteos_a/issues/I3W1)
* 修复了内核的VFAT测试用例 ([a8384b5](https://gitee.com/openharmony/kernel_liteos_a/commits/a8384b5db2274d50a350910d7cfd3fc36b4f4103)), closes [#I3XF3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3XF3)
* 修复mq_close关闭后仍然占用文件描述符的问题 ([590c7b4](https://gitee.com/openharmony/kernel_liteos_a/commits/590c7b4e22662781d05ad035a785e985d573ec33)), closes [#I3ZQDA](https://gitee.com/openharmony/kernel_liteos_a/issues/I3ZQDA)
* 修复mqueue问题 ([26ee8b8](https://gitee.com/openharmony/kernel_liteos_a/commits/26ee8b836e346e641de4ecd72284f5d377bca6f8)), closes [#I43P4T](https://gitee.com/openharmony/kernel_liteos_a/issues/I43P4T)
* 修复sigwait等待到的信号值与获取的siginfo中的值不一致 ([ed7defb](https://gitee.com/openharmony/kernel_liteos_a/commits/ed7defbd439c345a07159d40eb04433afd530004)), closes [#I3M12H](https://gitee.com/openharmony/kernel_liteos_a/issues/I3M12H)
* 修复了LOSCFG_FS_FAT_VIRTUAL_PARTITION宏开关错误作用域引起的功能错误 ([acda419](https://gitee.com/openharmony/kernel_liteos_a/commits/acda419a2d773ea890052a16ee66b4872f941fbb)), closes [#I3W1IW](https://gitee.com/openharmony/kernel_liteos_a/issues/I3W1IW)
* 修复了内核的VFAT测试用例 ([a8384b5](https://gitee.com/openharmony/kernel_liteos_a/commits/a8384b5db2274d50a350910d7cfd3fc36b4f4103)), closes [#I3XF3R](https://gitee.com/openharmony/kernel_liteos_a/issues/I3XF3R)
* 修复内核access chmod chown接口 ([56a95b9](https://gitee.com/openharmony/kernel_liteos_a/commits/56a95b9ec903f815f9199ac65ca318e00a83b2ed)), closes [#I3Z5L6](https://gitee.com/openharmony/kernel_liteos_a/issues/I3Z5L6)
* 修复内核c库的makefile中被优化函数替换的高频函数依然参与了编译的问题 ([6f6dc4f](https://gitee.com/openharmony/kernel_liteos_a/commits/6f6dc4f24c8ab05a6d42da46a9fa41d74a477bd7)), closes [#I3XGM8](https://gitee.com/openharmony/kernel_liteos_a/issues/I3XGM8)
* 修复内核堆完整性检查逻辑中访问非法指针导致系统异常问题。 ([30f5ab8](https://gitee.com/openharmony/kernel_liteos_a/commits/30f5ab89b72d45f596b15af82a8e8e01add7977d)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* 修复启动框架debug模式下-Werror=maybe-uninitialized告警以及符号链接不进镜像的隐患 ([4c02415](https://gitee.com/openharmony/kernel_liteos_a/commits/4c024159a9600745863e49ee955308470a5b657b)), closes [#I3T5](https://gitee.com/openharmony/kernel_liteos_a/issues/I3T5)
* 修复内核堆完整性检查逻辑中访问非法指针导致系统异常问题。 ([30f5ab8](https://gitee.com/openharmony/kernel_liteos_a/commits/30f5ab89b72d45f596b15af82a8e8e01add7977d)), closes [#I3VJZT](https://gitee.com/openharmony/kernel_liteos_a/issues/I3VJZT)
* 修复启动框架debug模式下-Werror=maybe-uninitialized告警以及符号链接不进镜像的隐患 ([4c02415](https://gitee.com/openharmony/kernel_liteos_a/commits/4c024159a9600745863e49ee955308470a5b657b)), closes [#I3T5HR](https://gitee.com/openharmony/kernel_liteos_a/issues/I3T5HR)
* 修复开机概率挂死 ([2e82c36](https://gitee.com/openharmony/kernel_liteos_a/commits/2e82c361f73b2119613c3571c48faae8ec41d4eb)), closes [#I3SWY2](https://gitee.com/openharmony/kernel_liteos_a/issues/I3SWY2)
* 修复文档链接失效问题 ([42a3a6c](https://gitee.com/openharmony/kernel_liteos_a/commits/42a3a6c51bfca4ade8ce94084ea2f8eb1c86a137)), closes [#I45297](https://gitee.com/openharmony/kernel_liteos_a/issues/I45297)
* 修改/proc/mounts显示格式 ([6860246](https://gitee.com/openharmony/kernel_liteos_a/commits/6860246cfaac6f540665e79bbc4c3d54c419b092)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* 修改clock_gettime接口适配posix标准测试用例011输入clk_id错误时返回值ESRCH为EINVAL. ([f8cf6e6](https://gitee.com/openharmony/kernel_liteos_a/commits/f8cf6e6439ee017fe8e0d4ecfc9949c28fa6775f)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* 修改DoNanoSleep 以纳秒为单位 ([6917e08](https://gitee.com/openharmony/kernel_liteos_a/commits/6917e08431689ccbd5a30e9a39b67016ffb64d0a)), closes [#I3Z9](https://gitee.com/openharmony/kernel_liteos_a/issues/I3Z9)
* 修改某些平台保存bbox日志失败的问题 ([8f6a1dd](https://gitee.com/openharmony/kernel_liteos_a/commits/8f6a1dd33c59164070e8d2fb5abbd3e76ef8ac8e)), closes [#I41](https://gitee.com/openharmony/kernel_liteos_a/issues/I41)
* 修改默认窗口宽度到400 ([09c491c](https://gitee.com/openharmony/kernel_liteos_a/commits/09c491ca1fd6d3110eafb0d07e45b25bdc3bd5d0)), closes [#I40](https://gitee.com/openharmony/kernel_liteos_a/issues/I40)
* 关闭jffs和fat后rootfs配置也被相应关闭导致nand介质的rootfs不可用。 ([0ea476b](https://gitee.com/openharmony/kernel_liteos_a/commits/0ea476b9741fabd3c255c2770688f587920cf509)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* 修改/proc/mounts显示格式 ([6860246](https://gitee.com/openharmony/kernel_liteos_a/commits/6860246cfaac6f540665e79bbc4c3d54c419b092)), closes [#I3XGCS](https://gitee.com/openharmony/kernel_liteos_a/issues/I3XGCS)
* 修改clock_gettime接口适配posix标准测试用例011输入clk_id错误时返回值ESRCH为EINVAL. ([f8cf6e6](https://gitee.com/openharmony/kernel_liteos_a/commits/f8cf6e6439ee017fe8e0d4ecfc9949c28fa6775f)), closes [#I3OUHI](https://gitee.com/openharmony/kernel_liteos_a/issues/I3OUHI)
* 修改DoNanoSleep 以纳秒为单位 ([6917e08](https://gitee.com/openharmony/kernel_liteos_a/commits/6917e08431689ccbd5a30e9a39b67016ffb64d0a)), closes [#I3Z9DP](https://gitee.com/openharmony/kernel_liteos_a/issues/I3Z9DP)
* 修改某些平台保存bbox日志失败的问题 ([8f6a1dd](https://gitee.com/openharmony/kernel_liteos_a/commits/8f6a1dd33c59164070e8d2fb5abbd3e76ef8ac8e)), closes [#I41UTP](https://gitee.com/openharmony/kernel_liteos_a/issues/I41UTP)
* 修改默认窗口宽度到400 ([09c491c](https://gitee.com/openharmony/kernel_liteos_a/commits/09c491ca1fd6d3110eafb0d07e45b25bdc3bd5d0)), closes [#I40LQX](https://gitee.com/openharmony/kernel_liteos_a/issues/I40LQX)
* 关闭jffs和fat后rootfs配置也被相应关闭导致nand介质的rootfs不可用。 ([0ea476b](https://gitee.com/openharmony/kernel_liteos_a/commits/0ea476b9741fabd3c255c2770688f587920cf509)), closes [#I3SBYN](https://gitee.com/openharmony/kernel_liteos_a/issues/I3SBYN)
* 内核态在console初始化完成后使用printf无法正常打印 ([44ce696](https://gitee.com/openharmony/kernel_liteos_a/commits/44ce6969048c2e252f3f9d66fa485c77bdab8ae7)), closes [#I3UG00](https://gitee.com/openharmony/kernel_liteos_a/issues/I3UG00)
* 去掉冗余的strip操作 ([7819d15](https://gitee.com/openharmony/kernel_liteos_a/commits/7819d15b3619681ae37a1349a6bec2440c829ae9)), closes [#I43767](https://gitee.com/openharmony/kernel_liteos_a/issues/I43767)
* 合并进程栈两个地址连续的region ([42f374d](https://gitee.com/openharmony/kernel_liteos_a/commits/42f374dd7a353f1c8227e92fa92827c1c7b32424)), closes [#I43](https://gitee.com/openharmony/kernel_liteos_a/issues/I43)
* 在内核提示No idle TCB时增加打印当前系统任务信息以方便问题定位。 ([11a9b00](https://gitee.com/openharmony/kernel_liteos_a/commits/11a9b00d43a6dbe9fba9f6eb07d78a9d226c28f8)), closes [#I434](https://gitee.com/openharmony/kernel_liteos_a/issues/I434)
* 合并进程栈两个地址连续的region ([42f374d](https://gitee.com/openharmony/kernel_liteos_a/commits/42f374dd7a353f1c8227e92fa92827c1c7b32424)), closes [#I43QYJ](https://gitee.com/openharmony/kernel_liteos_a/issues/I43QYJ)
* 在内核提示No idle TCB时增加打印当前系统任务信息以方便问题定位。 ([11a9b00](https://gitee.com/openharmony/kernel_liteos_a/commits/11a9b00d43a6dbe9fba9f6eb07d78a9d226c28f8)), closes [#I434UC](https://gitee.com/openharmony/kernel_liteos_a/issues/I434UC)
* 增加表头,内容以制表符分栏。 ([e9ad6b7](https://gitee.com/openharmony/kernel_liteos_a/commits/e9ad6b71c3b1136414672cd21b339ded7a02dfb9)), closes [#I3W2M9](https://gitee.com/openharmony/kernel_liteos_a/issues/I3W2M9)
* 将用户态内存调测解析脚本移至tools目录下 ([85b4cb7](https://gitee.com/openharmony/kernel_liteos_a/commits/85b4cb7a67b717984d3ebf68115c7139cc61d690)), closes [#I42T9](https://gitee.com/openharmony/kernel_liteos_a/issues/I42T9)
* 将用户态内存调测解析脚本移至tools目录下 ([85b4cb7](https://gitee.com/openharmony/kernel_liteos_a/commits/85b4cb7a67b717984d3ebf68115c7139cc61d690)), closes [#I42T9A](https://gitee.com/openharmony/kernel_liteos_a/issues/I42T9A)
* 恢复了FATFS设置卷标的功能 ([9515d53](https://gitee.com/openharmony/kernel_liteos_a/commits/9515d53dccc9a6458bfbaf8e15143928f05cb660)), closes [#I3Y5G8](https://gitee.com/openharmony/kernel_liteos_a/issues/I3Y5G8)
* 解决kill进程时无法保证进程的已持有的内核资源合理释放. ([cf89f01](https://gitee.com/openharmony/kernel_liteos_a/commits/cf89f016e93f28f8d72e6f5de08640d08a155908)), closes [#I3S0N0](https://gitee.com/openharmony/kernel_liteos_a/issues/I3S0N0)
* 解决不同环境下计算的rootfs的size偏小导致mcopy造成的disk full错误 ([c54879b](https://gitee.com/openharmony/kernel_liteos_a/commits/c54879b54875abece53b1f64072cfacbd2e1970e)), closes [#I3IA06](https://gitee.com/openharmony/kernel_liteos_a/issues/I3IA06)
* 设置qemu默认userfs大小/修改qemu驱动目录 ([1d952a2](https://gitee.com/openharmony/kernel_liteos_a/commits/1d952a254a6e7ec2f70f7112eb27355cfd01ba4d)), closes [#I3XW96](https://gitee.com/openharmony/kernel_liteos_a/issues/I3XW96) [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* 设置qemu默认userfs大小/修改qemu驱动目录 ([1d952a2](https://gitee.com/openharmony/kernel_liteos_a/commits/1d952a254a6e7ec2f70f7112eb27355cfd01ba4d)), closes [#I3XW96](https://gitee.com/openharmony/kernel_liteos_a/issues/I3XW96)
### Features
* active mksh & toybox ([cacb4f0](https://gitee.com/openharmony/kernel_liteos_a/commits/cacb4f0103ecb2d1b7af54d84957f88d3e9443d2)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* active mksh & toybox ([cacb4f0](https://gitee.com/openharmony/kernel_liteos_a/commits/cacb4f0103ecb2d1b7af54d84957f88d3e9443d2)), closes [#I3VEOG](https://gitee.com/openharmony/kernel_liteos_a/issues/I3VEOG)
* Add /dev/quickstart to support synchronous communication between processes in user mode startup. ([46b63f7](https://gitee.com/openharmony/kernel_liteos_a/commits/46b63f71537789743ed2f3f337c1809ee4900d71)), closes [#I3OHO5](https://gitee.com/openharmony/kernel_liteos_a/issues/I3OHO5)
* add /proc/fd file to dump the pid/fd/path information ([600dded](https://gitee.com/openharmony/kernel_liteos_a/commits/600dded31e80df275ed08c326c0ce3d1857d8dd8)), closes [#I3WB5](https://gitee.com/openharmony/kernel_liteos_a/issues/I3WB5)
* add /proc/fs_cache to display cache info ([231cb6b](https://gitee.com/openharmony/kernel_liteos_a/commits/231cb6be27380948bc48136ae2e02c28450f47a8)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* add /proc/fs_cache to display cache info ([53c6d96](https://gitee.com/openharmony/kernel_liteos_a/commits/53c6d96c6f97cb006216769f8b73f50fba3bc325)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* add /proc/fd file to dump the pid/fd/path information ([600dded](https://gitee.com/openharmony/kernel_liteos_a/commits/600dded31e80df275ed08c326c0ce3d1857d8dd8)), closes [#I3WB5U](https://gitee.com/openharmony/kernel_liteos_a/issues/I3WB5U)
* add /proc/fs_cache to display cache info ([231cb6b](https://gitee.com/openharmony/kernel_liteos_a/commits/231cb6be27380948bc48136ae2e02c28450f47a8)), closes [#I3WWBD](https://gitee.com/openharmony/kernel_liteos_a/issues/I3WWBD)
* add /proc/fs_cache to display cache info ([53c6d96](https://gitee.com/openharmony/kernel_liteos_a/commits/53c6d96c6f97cb006216769f8b73f50fba3bc325)), closes [#I3WESD](https://gitee.com/openharmony/kernel_liteos_a/issues/I3WESD)
* add and fix some syscall ([ce849f2](https://gitee.com/openharmony/kernel_liteos_a/commits/ce849f2145e1569517c5244c9ffcaebed53f3a66))
* add blackbox for liteos_a ([a195aac](https://gitee.com/openharmony/kernel_liteos_a/commits/a195aac9fb60b0163f9eebb29084287d226bd14c)), closes [#I406](https://gitee.com/openharmony/kernel_liteos_a/issues/I406)
* add blackbox for liteos_a ([425975e](https://gitee.com/openharmony/kernel_liteos_a/commits/425975e4811023e31a520979c20ea2562224d9d0)), closes [#I3NN7](https://gitee.com/openharmony/kernel_liteos_a/issues/I3NN7)
* add clear cache cmd to /proc/fs_cache ([3d1cf68](https://gitee.com/openharmony/kernel_liteos_a/commits/3d1cf683f37a6f75e9db2ce1f11ec93159b77663)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* add blackbox for liteos_a ([a195aac](https://gitee.com/openharmony/kernel_liteos_a/commits/a195aac9fb60b0163f9eebb29084287d226bd14c)), closes [#I406NP](https://gitee.com/openharmony/kernel_liteos_a/issues/I406NP)
* add blackbox for liteos_a ([425975e](https://gitee.com/openharmony/kernel_liteos_a/commits/425975e4811023e31a520979c20ea2562224d9d0))
* add clear cache cmd to /proc/fs_cache ([3d1cf68](https://gitee.com/openharmony/kernel_liteos_a/commits/3d1cf683f37a6f75e9db2ce1f11ec93159b77663)), closes [#I3XLPH](https://gitee.com/openharmony/kernel_liteos_a/issues/I3XLPH)
* add liteos patch ability ([98ca844](https://gitee.com/openharmony/kernel_liteos_a/commits/98ca8441fe75ee1c3318a6a09376fd72f5a51350))
* add support for gn build system ([a8805a6](https://gitee.com/openharmony/kernel_liteos_a/commits/a8805a65aab9109b915364fccf36c8328f636e48))
* add uid/gid for ProcFs ([6780659](https://gitee.com/openharmony/kernel_liteos_a/commits/67806596a3c0df9a54893d8c74ebe9da98d7fb06)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* A核proc文件系统在echo模式下新增write的功能 ([f10dd7c](https://gitee.com/openharmony/kernel_liteos_a/commits/f10dd7c135d37a5fb0d78610d5ece5807d01eb1f)), closes [#I3T6](https://gitee.com/openharmony/kernel_liteos_a/issues/I3T6)
* add uid/gid for ProcFs ([6780659](https://gitee.com/openharmony/kernel_liteos_a/commits/67806596a3c0df9a54893d8c74ebe9da98d7fb06)), closes [#I3WGVP](https://gitee.com/openharmony/kernel_liteos_a/issues/I3WGVP)
* A核proc文件系统在echo模式下新增write的功能 ([f10dd7c](https://gitee.com/openharmony/kernel_liteos_a/commits/f10dd7c135d37a5fb0d78610d5ece5807d01eb1f)), closes [#I3T6MZ](https://gitee.com/openharmony/kernel_liteos_a/issues/I3T6MZ)
* build OHOS_Image from kernel ([abf4d8f](https://gitee.com/openharmony/kernel_liteos_a/commits/abf4d8fb252631aca9d46211762880a23be2a0b1))
* **build:** make liteos_config_file available as gn argument ([f9a9077](https://gitee.com/openharmony/kernel_liteos_a/commits/f9a907772f506ca7e2d84e96d4d17cffc7dae50f))
* **build:** 使用xts -notest选项时内核用例不参与编译构建和用例编译配置方式调整 ([9bdf716](https://gitee.com/openharmony/kernel_liteos_a/commits/9bdf716407c125c9877b6f49c2133112c18cdabc))
* don't apply module_swith on configs of config ([f3beb4b](https://gitee.com/openharmony/kernel_liteos_a/commits/f3beb4b273c9a76fbfaffe57302f27d2a74cd2ba))
* enable gn build for toybox and mksh ([c54bfa1](https://gitee.com/openharmony/kernel_liteos_a/commits/c54bfa16e3907482c252e9738192df869c63326e))
* fatfs支持符号链接功能 ([e50cf0b](https://gitee.com/openharmony/kernel_liteos_a/commits/e50cf0be6f6d118022b6d79c5177aece574ba150)), closes [#I3V8D1](https://gitee.com/openharmony/kernel_liteos_a/issues/I3V8D1)
* **file system:** add memory-based romfs ([c4595d2](https://gitee.com/openharmony/kernel_liteos_a/commits/c4595d25042b188570d991a815009764c37f3cb3)), closes [#I3S0](https://gitee.com/openharmony/kernel_liteos_a/issues/I3S0)
* **file system:** add memory-based romfs ([c4595d2](https://gitee.com/openharmony/kernel_liteos_a/commits/c4595d25042b188570d991a815009764c37f3cb3)), closes [#I3S0CP](https://gitee.com/openharmony/kernel_liteos_a/issues/I3S0CP)
* introduce mksh toybox to rootfs ([41c7689](https://gitee.com/openharmony/kernel_liteos_a/commits/41c7689dfa49c52fb15705ce15ef22a278fbf2ef))
* L0-L1 支持Trace ([dc9ec68](https://gitee.com/openharmony/kernel_liteos_a/commits/dc9ec6856fe14aa604f037f55f17a3ba2bafb098)), closes [#I46WA0](https://gitee.com/openharmony/kernel_liteos_a/issues/I46WA0)
* L1支持低功耗投票框架 ([21d8ac8](https://gitee.com/openharmony/kernel_liteos_a/commits/21d8ac8752469f6e0dc2d50d28b75421f665385a)), closes [#I3VS5](https://gitee.com/openharmony/kernel_liteos_a/issues/I3VS5)
* L1支持低功耗投票框架 ([21d8ac8](https://gitee.com/openharmony/kernel_liteos_a/commits/21d8ac8752469f6e0dc2d50d28b75421f665385a)), closes [#I3VS5N](https://gitee.com/openharmony/kernel_liteos_a/issues/I3VS5N)
* **libc:** upgrade optimized-routines to v21.02 ([1ec8d5a](https://gitee.com/openharmony/kernel_liteos_a/commits/1ec8d5a454658e95c4acb821d0878f357f4e82ad))
* **make:** optimize makefiles and remove some unused files ([0e26094](https://gitee.com/openharmony/kernel_liteos_a/commits/0e260949c962158a263d4b0ad45fe9f6843d6e30))
* Open macro for ADC moudule ([c71ec9d](https://gitee.com/openharmony/kernel_liteos_a/commits/c71ec9d7e8574078a9dc2a8463f3141cca3d625a))
* **QEMU_ARM_VIRT_CA7:** 使能FAT文件系统编译选项 ([49856dc](https://gitee.com/openharmony/kernel_liteos_a/commits/49856dc1e0de1c5e92346c83eda641dfb1bb16be))
* support .mkshrc ([51a50c9](https://gitee.com/openharmony/kernel_liteos_a/commits/51a50c95b4cd47b6931523926b728d1c0ff8988b)), closes [#I3Y5](https://gitee.com/openharmony/kernel_liteos_a/issues/I3Y5)
* support link/symlink/readlink ([6eddc86](https://gitee.com/openharmony/kernel_liteos_a/commits/6eddc869d349be59860bfd84ff10b7579a9b00a9)), closes [#I3Q0](https://gitee.com/openharmony/kernel_liteos_a/issues/I3Q0)
* support toybox in qemu ([5618319](https://gitee.com/openharmony/kernel_liteos_a/commits/561831928bb1ad1871b2d60d2bba2d67488cea5f)), closes [#I3V17](https://gitee.com/openharmony/kernel_liteos_a/issues/I3V17)
* timer_create支持以SIGEV_THREAD方式创建定时器 ([e5f6bf0](https://gitee.com/openharmony/kernel_liteos_a/commits/e5f6bf05567c2d193f3746caca502199e7b81e92)), closes [#I3](https://gitee.com/openharmony/kernel_liteos_a/issues/I3)
* support .mkshrc ([51a50c9](https://gitee.com/openharmony/kernel_liteos_a/commits/51a50c95b4cd47b6931523926b728d1c0ff8988b)), closes [#I3Y5KE](https://gitee.com/openharmony/third_party_mksh/issues/I3Y5KE)
* support link/symlink/readlink ([6eddc86](https://gitee.com/openharmony/kernel_liteos_a/commits/6eddc869d349be59860bfd84ff10b7579a9b00a9)), closes [#I3Q0OD](https://gitee.com/openharmony/kernel_liteos_a/issues/I3Q0OD)
* support toybox in qemu ([5618319](https://gitee.com/openharmony/kernel_liteos_a/commits/561831928bb1ad1871b2d60d2bba2d67488cea5f)), closes [#I3V17D](https://gitee.com/openharmony/kernel_liteos_a/issues/I3V17D)
* timer_create支持以SIGEV_THREAD方式创建定时器 ([e5f6bf0](https://gitee.com/openharmony/kernel_liteos_a/commits/e5f6bf05567c2d193f3746caca502199e7b81e92)), closes [#I3SRFI](https://gitee.com/openharmony/kernel_liteos_a/issues/I3SRFI)
* using kconfiglib instead of kconfig ([8784694](https://gitee.com/openharmony/kernel_liteos_a/commits/878469468647a19f704e7ee2af696b0ba8ab775a))
* vfs support sdcard hotplug ([2db80ec](https://gitee.com/openharmony/kernel_liteos_a/commits/2db80ecb389176b53c77807567895470bb180a06)), closes [#I44WH1](https://gitee.com/openharmony/kernel_liteos_a/issues/I44WH1)
* **vfs:** vfs支持FD_CLOEXEC标记 ([27dca4d](https://gitee.com/openharmony/kernel_liteos_a/commits/27dca4d857ef8de6b4bb9302e0dd435be7e3284f)), closes [#I3U81](https://gitee.com/openharmony/kernel_liteos_a/issues/I3U81)
* **vfs:** vfs支持FD_CLOEXEC标记 ([27dca4d](https://gitee.com/openharmony/kernel_liteos_a/commits/27dca4d857ef8de6b4bb9302e0dd435be7e3284f)), closes [#I3U81W](https://gitee.com/openharmony/kernel_liteos_a/issues/I3U81W)
* 删除zpfs冗余代码 ([3393479](https://gitee.com/openharmony/kernel_liteos_a/commits/3393479c52f4a9dfe2394bb32beb4b98fca8e171))
* 基于汇编实现内核对用户态内存清零的功能 ([9db3407](https://gitee.com/openharmony/kernel_liteos_a/commits/9db3407589bb0b2d4a5772faac3130032bc0b8a9)), closes [#I3XXT0](https://gitee.com/openharmony/kernel_liteos_a/issues/I3XXT0)
* 增加mount的MS_RDONLY标志的支持 ([8729f6e](https://gitee.com/openharmony/kernel_liteos_a/commits/8729f6ee57ea57bc664d076ff112c8726fedded9)), closes [#I3Z1W6](https://gitee.com/openharmony/kernel_liteos_a/issues/I3Z1W6)
* 支持killpg和waitid ([dc3cc09](https://gitee.com/openharmony/kernel_liteos_a/commits/dc3cc094a75c6da65d87522930afea06106d3933))
* 新增toybox reboot命令 ([e567a10](https://gitee.com/openharmony/kernel_liteos_a/commits/e567a10d021c3e0fe02d6911dbe8687255c67ffa)), closes [#I3YQ7](https://gitee.com/openharmony/kernel_liteos_a/issues/I3YQ7)
* 给开发者提供系统信息导出Hidumper工具。 ([cb17fa5](https://gitee.com/openharmony/kernel_liteos_a/commits/cb17fa50ed28e6e8f59b7d68ede13c759b983311)), closes [#I3NN7](https://gitee.com/openharmony/kernel_liteos_a/issues/I3NN7)
* 自研shell命令回补 ([7bc68f4](https://gitee.com/openharmony/kernel_liteos_a/commits/7bc68f454ff5fbf415712c9b8479b8c832f68417)), closes [#I44U0](https://gitee.com/openharmony/kernel_liteos_a/issues/I44U0)
* 新增toybox reboot命令 ([e567a10](https://gitee.com/openharmony/kernel_liteos_a/commits/e567a10d021c3e0fe02d6911dbe8687255c67ffa)), closes [#I3YQ7S](https://gitee.com/openharmony/third_party_toybox/issues/I3YQ7S)
* 给开发者提供系统信息导出Hidumper工具。 ([cb17fa5](https://gitee.com/openharmony/kernel_liteos_a/commits/cb17fa50ed28e6e8f59b7d68ede13c759b983311))
* 自研shell命令回补 ([7bc68f4](https://gitee.com/openharmony/kernel_liteos_a/commits/7bc68f454ff5fbf415712c9b8479b8c832f68417)), closes [#I44U0H](https://gitee.com/openharmony/third_party_toybox/issues/I44U0H)
### Performance Improvements
@@ -316,7 +316,7 @@ LOS_LmsAddrDisableProtect去能指定内存段的访问保护
### Reverts
* Revert "fix: 修改默认窗口宽度到400" ([1878849](https://gitee.com/openharmony/kernel_liteos_a/commits/187884937cd087e39a28c033c41033163d6b4766)), closes [#I42X9](https://gitee.com/openharmony/kernel_liteos_a/issues/I42X9)
* Revert "fix: 修改默认窗口宽度到400" ([1878849](https://gitee.com/openharmony/kernel_liteos_a/commits/187884937cd087e39a28c033c41033163d6b4766)), closes [#I42X9V](https://gitee.com/openharmony/kernel_liteos_a/issues/I42X9V)
### BREAKING CHANGES

View File

@@ -235,7 +235,12 @@ config SCHED_DEBUG
depends on DEBUG_VERSION
help
If you wish to build LiteOS with support for sched debug.
config SCHED_EDF_DEBUG
bool "Enable sched EDF debug Feature"
default n
depends on SCHED_DEBUG
help
If you wish to build LiteOS with support for sched debug.
config USER_INIT_DEBUG
bool "Enable user init Debug"
default n

View File

@@ -87,7 +87,7 @@ For compilation, please refer to the [compilation instructions](https://gitee.co
## Contribution<a name="section1371123476304"></a>
[How to involve](https://gitee.com/openharmony/docs/blob/HEAD/en/contribute/contribution.md)
[How to involve](https://gitee.com/openharmony/docs/blob/HEAD/en/contribute/contribution-guide.md)
[Commit message spec](https://gitee.com/openharmony/kernel_liteos_a/wikis/Commit%20message%20%E8%A7%84%E8%8C%83)

View File

@@ -73,5 +73,5 @@ executable("sample_usr_lms") {
"-Wl,--wrap=strcpy",
"-Wl,--wrap=strcat",
]
deps = [ "//kernel/liteos_a/kernel/extended/lms/usr:usrlmslib" ]
deps = [ "$LITEOSTOPDIR/kernel/extended/lms/usr:usrlmslib" ]
}

View File

@@ -29,7 +29,7 @@
import("//build/lite/config/component/lite_component.gni")
import("//kernel/liteos_a/liteos.gni")
import("//third_party/mksh/mksh.gni")
import("$THIRDPARTY_MKSH_DIR/mksh.gni")
group("mksh") {
deps = [ ":build_mksh" ]
@@ -42,7 +42,7 @@ copy("copy_mksh_src") {
build_ext_component("build_mksh") {
deps = [ ":copy_mksh_src" ]
deps += [ "//third_party/musl:sysroot_lite" ]
deps += [ "$THIRDPARTY_MUSL_DIR:sysroot_lite" ]
exec_path = rebase_path("$target_out_dir/mksh_build")
cflags = [

View File

@@ -44,7 +44,7 @@
ShellCB *g_shellCB = NULL;
ShellCB *OsGetShellCb()
ShellCB *OsGetShellCb(void)
{
return g_shellCB;
}

View File

@@ -29,7 +29,7 @@
import("//build/lite/config/component/lite_component.gni")
import("//kernel/liteos_a/liteos.gni")
import("//third_party/toybox/toybox.gni")
import("$THIRDPARTY_TOYBOX_DIR/toybox.gni")
group("toybox") {
deps = [ ":build_toybox" ]
@@ -51,7 +51,7 @@ build_ext_component("build_toybox") {
":copy_toybox_config",
":copy_toybox_src",
]
deps += [ "//third_party/musl:sysroot_lite" ]
deps += [ "$THIRDPARTY_MUSL_DIR:sysroot_lite" ]
exec_path = rebase_path("$target_out_dir/toybox_build")
cflags = [

View File

@@ -28,10 +28,10 @@
"name": "liteos_a",
"subsystem": "kernel",
"syscap": [
"SystemCapability.Kernel.liteos-a"
"SystemCapability.Kernel.Liteos-A"
],
"features": [],
"adated_system_type": [
"adapted_system_type": [
"small"
],
"rom": "1.5MB",

View File

@@ -28,7 +28,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//kernel/liteos_a/liteos.gni")
import("//third_party/NuttX/NuttX.gni")
import("$THIRDPARTY_NUTTX_DIR/NuttX.gni")
module_switch = defined(LOSCFG_FS_VFS_BLOCK_DEVICE)
module_name = get_path_info(rebase_path("."), "name")

View File

@@ -28,7 +28,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//kernel/liteos_a/liteos.gni")
import("//third_party/NuttX/NuttX.gni")
import("$THIRDPARTY_NUTTX_DIR/NuttX.gni")
module_switch = defined(LOSCFG_DRIVERS_VIDEO)
module_name = get_path_info(rebase_path("."), "name")

View File

@@ -28,7 +28,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//kernel/liteos_a/liteos.gni")
import("//third_party/FatFs/FatFs.gni")
import("$THIRDPARTY_FATFS_DIR/FatFs.gni")
module_switch = defined(LOSCFG_FS_FAT)
module_name = get_path_info(rebase_path("."), "name")

View File

@@ -31,7 +31,7 @@ import("//kernel/liteos_a/liteos.gni")
module_switch = defined(LOSCFG_FS_JFFS)
module_name = get_path_info(rebase_path("."), "name")
linux_path = rebase_path("//kernel/linux/linux-5.10")
linux_path = rebase_path("$KERNEL_LINUX_DIR")
out_path = rebase_path(target_out_dir)
kernel_module(module_name) {

View File

@@ -28,7 +28,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//kernel/liteos_a/liteos.gni")
import("//third_party/NuttX/NuttX.gni")
import("$THIRDPARTY_NUTTX_DIR/NuttX.gni")
module_switch = defined(LOSCFG_FS_NFS)
module_name = get_path_info(rebase_path("."), "name")

View File

@@ -103,6 +103,8 @@ static ssize_t ProcessContainerLink(unsigned int containerID, ContainerType type
static ssize_t ProcessContainerReadLink(struct ProcDirEntry *entry, char *buffer, size_t bufLen)
{
char *freeBuf = NULL;
char *buf = buffer;
ssize_t count;
unsigned int intSave;
if (entry == NULL) {
@@ -112,17 +114,41 @@ static ssize_t ProcessContainerReadLink(struct ProcDirEntry *entry, char *buffer
if (data == NULL) {
return -EINVAL;
}
if (LOS_IsUserAddressRange((VADDR_T)(UINTPTR)buffer, bufLen)) {
buf = LOS_MemAlloc(m_aucSysMem1, bufLen);
if (buf == NULL) {
return -ENOMEM;
}
(void)memset_s(buf, bufLen, 0, bufLen);
freeBuf = buf;
}
LosProcessCB *processCB = ProcGetProcessCB(data);
SCHEDULER_LOCK(intSave);
UINT32 containerID = OsGetContainerID(processCB, (ContainerType)data->type);
SCHEDULER_UNLOCK(intSave);
if (containerID != OS_INVALID_VALUE) {
return ProcessContainerLink(containerID, (ContainerType)data->type, buffer, bufLen);
count = ProcessContainerLink(containerID, (ContainerType)data->type, buf, bufLen);
} else {
count = strlen("(unknown)");
if (memcpy_s(buf, bufLen, "(unknown)", count + 1) != EOK) {
(void)LOS_MemFree(m_aucSysMem1, freeBuf);
return -EBADF;
}
}
count = strlen("(unknown)");
if (memcpy_s(buffer, bufLen, "(unknown)", count + 1) != EOK) {
return -EBADF;
if (count < 0) {
(void)LOS_MemFree(m_aucSysMem1, freeBuf);
return count;
}
if (LOS_IsUserAddressRange((VADDR_T)(UINTPTR)buffer, bufLen)) {
if (LOS_ArchCopyToUser(buffer, buf, bufLen) != 0) {
(void)LOS_MemFree(m_aucSysMem1, freeBuf);
return -EFAULT;
}
}
(void)LOS_MemFree(m_aucSysMem1, freeBuf);
return count;
}

View File

@@ -28,7 +28,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//kernel/liteos_a/liteos.gni")
import("//third_party/NuttX/NuttX.gni")
import("$THIRDPARTY_NUTTX_DIR/NuttX.gni")
module_switch = defined(LOSCFG_FS_RAMFS)
module_name = get_path_info(rebase_path("."), "name")

View File

@@ -28,7 +28,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//kernel/liteos_a/liteos.gni")
import("//third_party/NuttX/NuttX.gni")
import("$THIRDPARTY_NUTTX_DIR/NuttX.gni")
module_switch = defined(LOSCFG_FS_ROMFS)
module_name = get_path_info(rebase_path("."), "name")

View File

@@ -28,17 +28,14 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//kernel/liteos_a/liteos.gni")
import("//third_party/NuttX/NuttX.gni")
import("$THIRDPARTY_NUTTX_DIR/NuttX.gni")
module_switch = defined(LOSCFG_FS_VFS)
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"$LITEOSTOPDIR/fs/vfs/epoll/fs_epoll.c",
"$LITEOSTOPDIR/fs/vfs/mount.c",
"$LITEOSTOPDIR/fs/vfs/path_cache.c",
"$LITEOSTOPDIR/fs/vfs/vnode.c",
"$LITEOSTOPDIR/fs/vfs/vnode_hash.c",
"epoll/fs_epoll.c",
"mount.c",
"operation/fullpath.c",
"operation/vfs_chattr.c",
"operation/vfs_check.c",
@@ -55,7 +52,10 @@ kernel_module(module_name) {
"operation/vfs_readv.c",
"operation/vfs_utime.c",
"operation/vfs_writev.c",
"path_cache.c",
"vfs_cmd/vfs_shellcmd.c",
"vnode.c",
"vnode_hash.c",
]
sources += NUTTX_FS_DIRENT_SRC_FILES
sources += NUTTX_FS_DRIVER_SRC_FILES

View File

@@ -138,7 +138,7 @@ int VnodeAlloc(struct VnodeOps *vop, struct Vnode **newVnode)
VnodeHold();
vnode = GetFromFreeList();
if ((vnode == NULL) && g_totalVnodeSize < LOSCFG_MAX_VNODE_SIZE) {
vnode = (struct Vnode*)zalloc(sizeof(struct Vnode));
vnode = (struct Vnode *)zalloc(sizeof(struct Vnode));
g_totalVnodeSize++;
}

View File

@@ -67,51 +67,6 @@ config PAGE_TABLE_FINE_LOCK
help
This option will enable fine lock for page table.
######################### config options of container ####################
config KERNEL_CONTAINER
bool "Enable container Feature"
default n
depends on KERNEL_VM
config PID_CONTAINER
bool "Enable pid container Feature"
default n
depends on KERNEL_CONTAINER
config UTS_CONTAINER
bool "Enable uts container Feature"
default n
depends on KERNEL_CONTAINER
config MNT_CONTAINER
bool "Enable mnt container Feature"
default n
depends on KERNEL_CONTAINER
config CHROOT
bool "Enable chroot"
default n
depends on MNT_CONTAINER
config IPC_CONTAINER
bool "Enable ipc container Feature"
default n
depends on KERNEL_CONTAINER
config TIME_CONTAINER
bool "Enable time container"
default n
depends on KERNEL_CONTAINER
config USER_CONTAINER
bool "Enable user container"
default n
depends on KERNEL_CONTAINER
config NET_CONTAINER
bool "Enable net container"
default n
depends on KERNEL_CONTAINER
######################### config options of extended #####################
source "kernel/extended/Kconfig"

View File

@@ -32,15 +32,6 @@ import("//kernel/liteos_a/liteos.gni")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"container/los_container.c",
"container/los_credentials.c",
"container/los_ipc_container.c",
"container/los_mnt_container.c",
"container/los_net_container.c",
"container/los_pid_container.c",
"container/los_time_container.c",
"container/los_user_container.c",
"container/los_uts_container.c",
"core/los_bitmap.c",
"core/los_info.c",
"core/los_process.c",
@@ -76,6 +67,7 @@ kernel_module(module_name) {
"mp/los_percpu.c",
"mp/los_spinlock.c",
"om/los_err.c",
"sched/los_deadline.c",
"sched/los_idle.c",
"sched/los_priority.c",
"sched/los_sched.c",

View File

@@ -39,7 +39,6 @@ LOCAL_SRCS := $(wildcard ipc/*.c) $(wildcard core/*.c) $(wildcard mem/membox/*.
$(wildcard mp/*.c) \
$(wildcard sched/*.c) \
$(wildcard vm/*.c) \
$(wildcard container/*.c)
LOCAL_FLAGS := $(LITEOS_CFLAGS_INTERWORK) -Wno-frame-address

View File

@@ -939,7 +939,37 @@ LITE_OS_SEC_TEXT_INIT UINT32 OsSystemProcessCreate(VOID)
return LOS_OK;
}
STATIC INLINE INT32 OsProcessSchedlerParamCheck(INT32 which, INT32 pid, UINT16 prio, UINT16 policy)
INT32 OsSchedulerParamCheck(UINT16 policy, BOOL isThread, const LosSchedParam *param)
{
if (param == NULL) {
return LOS_EINVAL;
}
if ((policy == LOS_SCHED_RR) || (isThread && (policy == LOS_SCHED_FIFO))) {
if ((param->priority < OS_PROCESS_PRIORITY_HIGHEST) ||
(param->priority > OS_PROCESS_PRIORITY_LOWEST)) {
return LOS_EINVAL;
}
return LOS_OK;
}
if (policy == LOS_SCHED_DEADLINE) {
if ((param->runTimeUs < OS_SCHED_EDF_MIN_RUNTIME) || (param->runTimeUs >= param->deadlineUs)) {
return LOS_EINVAL;
}
if ((param->deadlineUs < OS_SCHED_EDF_MIN_DEADLINE) || (param->deadlineUs > OS_SCHED_EDF_MAX_DEADLINE)) {
return LOS_EINVAL;
}
if (param->periodUs < param->deadlineUs) {
return LOS_EINVAL;
}
return LOS_OK;
}
return LOS_EINVAL;
}
STATIC INLINE INT32 ProcessSchedulerParamCheck(INT32 which, INT32 pid, UINT16 policy, const LosSchedParam *param)
{
if (OS_PID_CHECK_INVALID(pid)) {
return LOS_EINVAL;
@@ -949,19 +979,11 @@ STATIC INLINE INT32 OsProcessSchedlerParamCheck(INT32 which, INT32 pid, UINT16 p
return LOS_EINVAL;
}
if (prio > OS_PROCESS_PRIORITY_LOWEST) {
return LOS_EINVAL;
}
if (policy != LOS_SCHED_RR) {
return LOS_EINVAL;
}
return LOS_OK;
return OsSchedulerParamCheck(policy, FALSE, param);
}
#ifdef LOSCFG_SECURITY_CAPABILITY
STATIC BOOL OsProcessCapPermitCheck(const LosProcessCB *processCB, const SchedParam *param, UINT16 prio)
STATIC BOOL OsProcessCapPermitCheck(const LosProcessCB *processCB, const SchedParam *param, UINT16 policy, UINT16 prio)
{
LosProcessCB *runProcess = OsCurrProcessGet();
@@ -971,7 +993,7 @@ STATIC BOOL OsProcessCapPermitCheck(const LosProcessCB *processCB, const SchedPa
}
/* user mode process can reduce the priority of itself */
if ((runProcess->processID == processCB->processID) && (prio > param->basePrio)) {
if ((runProcess->processID == processCB->processID) && (policy == LOS_SCHED_RR) && (prio > param->basePrio)) {
return TRUE;
}
@@ -983,12 +1005,13 @@ STATIC BOOL OsProcessCapPermitCheck(const LosProcessCB *processCB, const SchedPa
}
#endif
LITE_OS_SEC_TEXT INT32 OsSetProcessScheduler(INT32 which, INT32 pid, UINT16 prio, UINT16 policy)
LITE_OS_SEC_TEXT INT32 OsSetProcessScheduler(INT32 which, INT32 pid, UINT16 policy, const LosSchedParam *schedParam)
{
SchedParam param = { 0 };
BOOL needSched = FALSE;
UINT32 intSave;
INT32 ret = OsProcessSchedlerParamCheck(which, pid, prio, policy);
INT32 ret = ProcessSchedulerParamCheck(which, pid, policy, schedParam);
if (ret != LOS_OK) {
return -ret;
}
@@ -996,22 +1019,45 @@ LITE_OS_SEC_TEXT INT32 OsSetProcessScheduler(INT32 which, INT32 pid, UINT16 prio
LosProcessCB *processCB = OS_PCB_FROM_PID(pid);
SCHEDULER_LOCK(intSave);
if (OsProcessIsInactive(processCB)) {
ret = LOS_ESRCH;
goto EXIT;
SCHEDULER_UNLOCK(intSave);
return -LOS_ESRCH;
}
#ifdef LOSCFG_SECURITY_CAPABILITY
if (!OsProcessCapPermitCheck(processCB, &param, prio)) {
ret = LOS_EPERM;
goto EXIT;
}
#endif
LosTaskCB *taskCB = processCB->threadGroup;
taskCB->ops->schedParamGet(taskCB, &param);
param.basePrio = prio;
BOOL needSched = taskCB->ops->schedParamModify(taskCB, &param);
#ifdef LOSCFG_SECURITY_CAPABILITY
if (!OsProcessCapPermitCheck(processCB, &param, policy, schedParam->priority)) {
SCHEDULER_UNLOCK(intSave);
return -LOS_EPERM;
}
#endif
if (param.policy != policy) {
if (policy == LOS_SCHED_DEADLINE) { /* HPF -> EDF */
if (processCB->threadNumber > 1) {
SCHEDULER_UNLOCK(intSave);
return -LOS_EPERM;
}
OsSchedParamInit(taskCB, policy, NULL, schedParam);
needSched = TRUE;
goto TO_SCHED;
} else if (param.policy == LOS_SCHED_DEADLINE) { /* EDF -> HPF */
SCHEDULER_UNLOCK(intSave);
return -LOS_EPERM;
}
}
if (policy == LOS_SCHED_DEADLINE) {
param.runTimeUs = schedParam->runTimeUs;
param.deadlineUs = schedParam->deadlineUs;
param.periodUs = schedParam->periodUs;
} else {
param.basePrio = schedParam->priority;
}
needSched = taskCB->ops->schedParamModify(taskCB, &param);
TO_SCHED:
SCHEDULER_UNLOCK(intSave);
LOS_MpSchedule(OS_MP_CPU_ALL);
@@ -1019,25 +1065,26 @@ LITE_OS_SEC_TEXT INT32 OsSetProcessScheduler(INT32 which, INT32 pid, UINT16 prio
LOS_Schedule();
}
return LOS_OK;
EXIT:
SCHEDULER_UNLOCK(intSave);
return -ret;
}
LITE_OS_SEC_TEXT INT32 LOS_SetProcessScheduler(INT32 pid, UINT16 policy, UINT16 prio)
LITE_OS_SEC_TEXT INT32 LOS_SetProcessScheduler(INT32 pid, UINT16 policy, const LosSchedParam *schedParam)
{
return OsSetProcessScheduler(LOS_PRIO_PROCESS, pid, prio, policy);
return OsSetProcessScheduler(LOS_PRIO_PROCESS, pid, policy, schedParam);
}
LITE_OS_SEC_TEXT INT32 LOS_GetProcessScheduler(INT32 pid)
LITE_OS_SEC_TEXT INT32 LOS_GetProcessScheduler(INT32 pid, INT32 *policy, LosSchedParam *schedParam)
{
UINT32 intSave;
SchedParam param = { 0 };
if (OS_PID_CHECK_INVALID(pid)) {
return -LOS_EINVAL;
}
if ((policy == NULL) && (schedParam == NULL)) {
return -LOS_EINVAL;
}
SCHEDULER_LOCK(intSave);
LosProcessCB *processCB = OS_PCB_FROM_PID(pid);
if (OsProcessIsUnused(processCB)) {
@@ -1045,14 +1092,48 @@ LITE_OS_SEC_TEXT INT32 LOS_GetProcessScheduler(INT32 pid)
return -LOS_ESRCH;
}
LosTaskCB *taskCB = processCB->threadGroup;
taskCB->ops->schedParamGet(taskCB, &param);
SCHEDULER_UNLOCK(intSave);
return LOS_SCHED_RR;
if (policy != NULL) {
if (param.policy == LOS_SCHED_FIFO) {
*policy = LOS_SCHED_RR;
} else {
*policy = param.policy;
}
}
if (schedParam != NULL) {
if (param.policy == LOS_SCHED_DEADLINE) {
schedParam->runTimeUs = param.runTimeUs;
schedParam->deadlineUs = param.deadlineUs;
schedParam->periodUs = param.periodUs;
} else {
schedParam->priority = param.basePrio;
}
}
return LOS_OK;
}
LITE_OS_SEC_TEXT INT32 LOS_SetProcessPriority(INT32 pid, UINT16 prio)
LITE_OS_SEC_TEXT INT32 LOS_SetProcessPriority(INT32 pid, INT32 prio)
{
return OsSetProcessScheduler(LOS_PRIO_PROCESS, pid, prio, LOS_GetProcessScheduler(pid));
INT32 ret;
INT32 policy;
LosSchedParam param = {
.priority = prio,
};
ret = LOS_GetProcessScheduler(pid, &policy, NULL);
if (ret != LOS_OK) {
return ret;
}
if (policy == LOS_SCHED_DEADLINE) {
return -LOS_EINVAL;
}
return OsSetProcessScheduler(LOS_PRIO_PROCESS, pid, (UINT16)policy, &param);
}
LITE_OS_SEC_TEXT INT32 OsGetProcessPriority(INT32 which, INT32 pid)
@@ -1079,6 +1160,11 @@ LITE_OS_SEC_TEXT INT32 OsGetProcessPriority(INT32 which, INT32 pid)
LosTaskCB *taskCB = processCB->threadGroup;
taskCB->ops->schedParamGet(taskCB, &param);
if (param.policy == LOS_SCHED_DEADLINE) {
SCHEDULER_UNLOCK(intSave);
return -LOS_EINVAL;
}
SCHEDULER_UNLOCK(intSave);
return param.basePrio;
}
@@ -1850,6 +1936,38 @@ STATIC UINT32 OsCopyUser(LosProcessCB *childCB, LosProcessCB *parentCB)
return LOS_OK;
}
STATIC VOID GetCopyTaskParam(LosProcessCB *childProcessCB, UINTPTR entry, UINT32 size,
TSK_INIT_PARAM_S *taskParam, SchedParam *param)
{
UINT32 intSave;
LosTaskCB *runTask = OsCurrTaskGet();
SCHEDULER_LOCK(intSave);
if (OsProcessIsUserMode(childProcessCB)) {
taskParam->pfnTaskEntry = runTask->taskEntry;
taskParam->uwStackSize = runTask->stackSize;
taskParam->userParam.userArea = runTask->userArea;
taskParam->userParam.userMapBase = runTask->userMapBase;
taskParam->userParam.userMapSize = runTask->userMapSize;
} else {
taskParam->pfnTaskEntry = (TSK_ENTRY_FUNC)entry;
taskParam->uwStackSize = size;
}
if (runTask->taskStatus & OS_TASK_FLAG_PTHREAD_JOIN) {
taskParam->uwResved = LOS_TASK_ATTR_JOINABLE;
}
runTask->ops->schedParamGet(runTask, param);
SCHEDULER_UNLOCK(intSave);
taskParam->policy = param->policy;
taskParam->runTimeUs = param->runTimeUs;
taskParam->deadlineUs = param->deadlineUs;
taskParam->periodUs = param->periodUs;
taskParam->usTaskPrio = param->priority;
taskParam->processID = (UINTPTR)childProcessCB;
}
STATIC UINT32 OsCopyTask(UINT32 flags, LosProcessCB *childProcessCB, const CHAR *name, UINTPTR entry, UINT32 size)
{
LosTaskCB *runTask = OsCurrTaskGet();
@@ -1857,28 +1975,8 @@ STATIC UINT32 OsCopyTask(UINT32 flags, LosProcessCB *childProcessCB, const CHAR
UINT32 ret, taskID, intSave;
SchedParam param = { 0 };
SCHEDULER_LOCK(intSave);
if (OsProcessIsUserMode(childProcessCB)) {
taskParam.pfnTaskEntry = runTask->taskEntry;
taskParam.uwStackSize = runTask->stackSize;
taskParam.userParam.userArea = runTask->userArea;
taskParam.userParam.userMapBase = runTask->userMapBase;
taskParam.userParam.userMapSize = runTask->userMapSize;
} else {
taskParam.pfnTaskEntry = (TSK_ENTRY_FUNC)entry;
taskParam.uwStackSize = size;
}
if (runTask->taskStatus & OS_TASK_FLAG_PTHREAD_JOIN) {
taskParam.uwResved = LOS_TASK_ATTR_JOINABLE;
}
runTask->ops->schedParamGet(runTask, &param);
SCHEDULER_UNLOCK(intSave);
taskParam.pcName = (CHAR *)name;
taskParam.policy = param.policy;
taskParam.usTaskPrio = param.priority;
taskParam.processID = (UINTPTR)childProcessCB;
GetCopyTaskParam(childProcessCB, entry, size, &taskParam, &param);
ret = LOS_TaskCreateOnly(&taskID, &taskParam);
if (ret != LOS_OK) {

View File

@@ -394,7 +394,7 @@ STATIC VOID OsTaskResourcesToFree(LosTaskCB *taskCB)
return;
}
LITE_OS_SEC_TEXT VOID OsTaskCBRecycleToFree()
LITE_OS_SEC_TEXT VOID OsTaskCBRecycleToFree(void)
{
UINT32 intSave;
@@ -543,6 +543,7 @@ STATIC UINT32 TaskCBInit(LosTaskCB *taskCB, const TSK_INIT_PARAM_S *initParam)
UINT32 ret;
UINT32 numCount;
SchedParam schedParam = { 0 };
LosSchedParam initSchedParam = {0};
UINT16 policy = (initParam->policy == LOS_SCHED_NORMAL) ? LOS_SCHED_RR : initParam->policy;
TaskCBBaseInit(taskCB, initParam);
@@ -553,7 +554,14 @@ STATIC UINT32 TaskCBInit(LosTaskCB *taskCB, const TSK_INIT_PARAM_S *initParam)
return ret;
}
ret = OsSchedParamInit(taskCB, policy, &schedParam, initParam);
if (policy == LOS_SCHED_DEADLINE) {
initSchedParam.runTimeUs = initParam->runTimeUs;
initSchedParam.deadlineUs = initParam->deadlineUs;
initSchedParam.periodUs = initParam->periodUs;
} else {
initSchedParam.priority = initParam->usTaskPrio;
}
ret = OsSchedParamInit(taskCB, policy, &schedParam, &initSchedParam);
if (ret != LOS_OK) {
return ret;
}
@@ -1365,6 +1373,8 @@ LITE_OS_SEC_TEXT_INIT UINT32 OsCreateUserTask(UINTPTR processID, TSK_INIT_PARAM_
UINT32 taskID;
UINT32 ret;
UINT32 intSave;
INT32 policy;
SchedParam param;
ret = OsCreateUserTaskParamCheck(processID, initParam);
if (ret != LOS_OK) {
@@ -1373,14 +1383,25 @@ LITE_OS_SEC_TEXT_INIT UINT32 OsCreateUserTask(UINTPTR processID, TSK_INIT_PARAM_
initParam->uwStackSize = OS_USER_TASK_SYSCALL_STACK_SIZE;
initParam->usTaskPrio = OS_TASK_PRIORITY_LOWEST;
initParam->policy = LOS_SCHED_RR;
if (processID == OS_INVALID_VALUE) {
SCHEDULER_LOCK(intSave);
LosProcessCB *processCB = OsCurrProcessGet();
initParam->processID = (UINTPTR)processCB;
initParam->consoleID = processCB->consoleID;
SCHEDULER_UNLOCK(intSave);
ret = LOS_GetProcessScheduler(processCB->processID, &policy, NULL);
if (ret != LOS_OK) {
return OS_INVALID_VALUE;
}
initParam->policy = policy;
if (policy == LOS_SCHED_DEADLINE) {
OsSchedProcessDefaultSchedParamGet((UINT16)policy, &param);
initParam->runTimeUs = param.runTimeUs;
initParam->deadlineUs = param.deadlineUs;
initParam->periodUs = param.periodUs;
}
} else {
initParam->policy = LOS_SCHED_RR;
initParam->processID = processID;
initParam->consoleID = 0;
}

View File

@@ -535,7 +535,7 @@ extern LosVmSpace *OsExecProcessVmSpaceReplace(LosVmSpace *newSpace, UINTPTR sta
extern UINT32 OsExecRecycleAndInit(LosProcessCB *processCB, const CHAR *name, LosVmSpace *oldAspace, UINTPTR oldFiles);
extern UINT32 OsExecStart(const TSK_ENTRY_FUNC entry, UINTPTR sp, UINTPTR mapBase, UINT32 mapSize);
extern UINT32 OsSetProcessName(LosProcessCB *processCB, const CHAR *name);
extern INT32 OsSetProcessScheduler(INT32 which, INT32 pid, UINT16 prio, UINT16 policy);
extern INT32 OsSetProcessScheduler(INT32 which, INT32 pid, UINT16 policy, const LosSchedParam *param);
extern INT32 OsGetProcessPriority(INT32 which, INT32 pid);
extern LosProcessCB *OsGetUserInitProcess(VOID);
extern LosProcessCB *OsGetIdleProcess(VOID);
@@ -553,6 +553,7 @@ extern VOID OsProcessThreadGroupDestroy(VOID);
extern UINT32 OsGetProcessGroupCB(UINT32 pid, UINTPTR *ppgroupLeader);
extern LosProcessCB *OsGetDefaultProcessCB(VOID);
extern ProcessGroup *OsCreateProcessGroup(LosProcessCB *processCB);
INT32 OsSchedulerParamCheck(UINT16 policy, BOOL isThread, const LosSchedParam *param);
#ifdef __cplusplus
#if __cplusplus
}

View File

@@ -68,6 +68,10 @@ extern "C" {
#define OS_SCHED_TICK_TO_CYCLE(ticks) ((UINT64)ticks * OS_CYCLE_PER_TICK)
#define AFFI_MASK_TO_CPUID(mask) ((UINT16)((mask) - 1))
#define OS_SCHED_EDF_MIN_RUNTIME 100 /* 100 us */
#define OS_SCHED_EDF_MIN_DEADLINE 400 /* 400 us */
#define OS_SCHED_EDF_MAX_DEADLINE 5000000 /* 5 s */
extern UINT32 g_taskScheduled;
#define OS_SCHEDULER_ACTIVE (g_taskScheduled & (1U << ArchCurrCpuid()))
#define OS_SCHEDULER_ALL_ACTIVE (g_taskScheduled == LOSCFG_KERNEL_CPU_MASK)
@@ -98,9 +102,16 @@ typedef struct {
UINT32 queueBitmap;
} HPFRunqueue;
typedef struct {
LOS_DL_LIST root;
LOS_DL_LIST waitList;
UINT64 period;
} EDFRunqueue;
typedef struct {
SortLinkAttribute timeoutQueue; /* task timeout queue */
HPFRunqueue *hpfRunqueue;
EDFRunqueue *edfRunqueue;
UINT64 responseTime; /* Response time for current CPU tick interrupts */
UINT32 responseID; /* The response ID of the current CPU tick interrupt */
LosTaskCB *idleTask; /* idle task id */
@@ -212,30 +223,52 @@ STATIC INLINE VOID OsSchedRunqueuePendingSet(VOID)
OsSchedRunqueue()->schedFlag |= INT_PEND_RESCH;
}
#define LOS_SCHED_NORMAL 0U
#define LOS_SCHED_FIFO 1U
#define LOS_SCHED_RR 2U
#define LOS_SCHED_IDLE 3U
#define LOS_SCHED_NORMAL 0U
#define LOS_SCHED_FIFO 1U
#define LOS_SCHED_RR 2U
#define LOS_SCHED_IDLE 3U
#define LOS_SCHED_DEADLINE 6U
typedef struct {
UINT16 policy;
/* HPF scheduling parameters */
UINT16 basePrio;
UINT16 priority;
UINT32 timeSlice;
/* EDF scheduling parameters */
INT32 runTimeUs;
UINT32 deadlineUs;
UINT32 periodUs;
} SchedParam;
typedef struct {
UINT16 policy; /* This field must be present for all scheduling policies and must be the first in the structure */
UINT16 basePrio;
UINT16 priority;
UINT32 initTimeSlice;
UINT32 priBitmap; /**< Bitmap for recording the change of task priority, the priority can not be greater than 31 */
UINT32 initTimeSlice; /* cycle */
UINT32 priBitmap; /* Bitmap for recording the change of task priority, the priority can not be greater than 31 */
} SchedHPF;
#define EDF_UNUSED 0
#define EDF_NEXT_PERIOD 1
#define EDF_WAIT_FOREVER 2
#define EDF_INIT 3
typedef struct {
UINT16 policy;
UINT16 cpuid;
UINT32 flags;
INT32 runTime; /* cycle */
UINT64 deadline; /* deadline >> runTime */
UINT64 period; /* period >= deadline */
UINT64 finishTime; /* startTime + deadline */
} SchedEDF;
typedef struct {
union {
SchedEDF edf;
SchedHPF hpf;
} Policy;
};
} SchedPolicy;
typedef struct {
@@ -243,6 +276,7 @@ typedef struct {
VOID (*enqueue)(SchedRunqueue *rq, LosTaskCB *taskCB);
VOID (*start)(SchedRunqueue *rq, LosTaskCB *taskCB);
VOID (*exit)(LosTaskCB *taskCB);
UINT64 (*waitTimeGet)(LosTaskCB *taskCB);
UINT32 (*wait)(LosTaskCB *runTask, LOS_DL_LIST *list, UINT32 timeout);
VOID (*wake)(LosTaskCB *taskCB);
BOOL (*schedParamModify)(LosTaskCB *taskCB, const SchedParam *param);
@@ -463,6 +497,12 @@ STATIC INLINE BOOL OsTaskIsBlocked(const LosTaskCB *taskCB)
return ((taskCB->taskStatus & (OS_TASK_STATUS_SUSPENDED | OS_TASK_STATUS_PENDING | OS_TASK_STATUS_DELAY)) != 0);
}
STATIC INLINE BOOL OsSchedPolicyIsEDF(const LosTaskCB *taskCB)
{
const SchedEDF *sched = (const SchedEDF *)&taskCB->sp;
return (sched->policy == LOS_SCHED_DEADLINE);
}
STATIC INLINE LosTaskCB *OsCurrTaskGet(VOID)
{
return (LosTaskCB *)ArchCurrTaskGet();
@@ -623,6 +663,16 @@ STATIC INLINE VOID SchedTaskUnfreeze(LosTaskCB *taskCB)
BOOL OsSchedLimitCheckTime(LosTaskCB *task);
#endif
STATIC INLINE LosTaskCB *EDFRunqueueTopTaskGet(EDFRunqueue *rq)
{
LOS_DL_LIST *root = &rq->root;
if (LOS_ListEmpty(root)) {
return NULL;
}
return LOS_DL_LIST_ENTRY(LOS_DL_LIST_FIRST(root), LosTaskCB, pendList);
}
STATIC INLINE LosTaskCB *HPFRunqueueTopTaskGet(HPFRunqueue *rq)
{
LosTaskCB *newTask = NULL;
@@ -660,9 +710,16 @@ STATIC INLINE LosTaskCB *HPFRunqueueTopTaskGet(HPFRunqueue *rq)
return NULL;
}
VOID EDFProcessDefaultSchedParamGet(SchedParam *param);
VOID EDFSchedPolicyInit(SchedRunqueue *rq);
UINT32 EDFTaskSchedParamInit(LosTaskCB *taskCB, UINT16 policy,
const SchedParam *parentParam,
const LosSchedParam *param);
VOID HPFSchedPolicyInit(SchedRunqueue *rq);
VOID HPFTaskSchedParamInit(LosTaskCB *taskCB, UINT16 policy,
const SchedParam *parentParam, const TSK_INIT_PARAM_S *param);
const SchedParam *parentParam,
const LosSchedParam *param);
VOID HPFProcessDefaultSchedParamGet(SchedParam *param);
VOID IdleTaskSchedParamInit(LosTaskCB *taskCB);
@@ -670,7 +727,8 @@ VOID IdleTaskSchedParamInit(LosTaskCB *taskCB);
INT32 OsSchedParamCompare(const LosTaskCB *task1, const LosTaskCB *task2);
VOID OsSchedPriorityInheritance(LosTaskCB *owner, const SchedParam *param);
UINT32 OsSchedParamInit(LosTaskCB *taskCB, UINT16 policy,
const SchedParam *parentParam, const TSK_INIT_PARAM_S *param);
const SchedParam *parentParam,
const LosSchedParam *param);
VOID OsSchedProcessDefaultSchedParamGet(UINT16 policy, SchedParam *param);
VOID OsSchedResponseTimeReset(UINT64 responseTime);

View File

@@ -57,9 +57,11 @@ typedef struct {
#ifdef LOSCFG_SCHED_TICK_DEBUG
VOID OsSchedDebugRecordData(VOID);
UINT32 OsShellShowTickResponse(VOID);
UINT32 OsShellShowSchedStatistics(VOID);
UINT32 OsSchedDebugInit(VOID);
#endif
UINT32 OsShellShowSchedStatistics(VOID);
UINT32 OsShellShowEdfSchedStatistics(VOID);
VOID EDFDebugRecord(UINTPTR *taskCB, UINT64 oldFinish);
#endif
#ifdef __cplusplus

View File

@@ -101,6 +101,16 @@ extern "C" {
*/
#define OS_NS_PER_TICK (OS_SYS_NS_PER_SECOND / LOSCFG_BASE_CORE_TICK_PER_SECOND)
#define OS_US_TO_CYCLE(time, freq) ((((time) / OS_SYS_US_PER_SECOND) * (freq)) + \
(((time) % OS_SYS_US_PER_SECOND) * (freq) / OS_SYS_US_PER_SECOND))
#define OS_SYS_US_TO_CYCLE(time) OS_US_TO_CYCLE((time), OS_SYS_CLOCK)
#define OS_CYCLE_TO_US(cycle, freq) ((((cycle) / (freq)) * OS_SYS_US_PER_SECOND) + \
((cycle) % (freq) * OS_SYS_US_PER_SECOND / (freq)))
#define OS_SYS_CYCLE_TO_US(cycle) OS_CYCLE_TO_US((cycle), OS_SYS_CLOCK)
/**
* @ingroup los_sys
* The maximum length of name.

View File

@@ -53,6 +53,9 @@
#include "los_sched_pri.h"
#include "los_swtmr_pri.h"
#include "los_info_pri.h"
#ifdef LOSCFG_SCHED_DEBUG
#include "los_statistics_pri.h"
#endif
#define OS_PROCESS_MEM_INFO 0x2U
#undef SHOW
@@ -93,6 +96,8 @@ STATIC UINT8 *ConvertSchedPolicyToString(UINT16 policy)
return (UINT8 *)"RR";
} else if (policy == LOS_SCHED_FIFO) {
return (UINT8 *)"FIFO";
} else if (policy == LOS_SCHED_DEADLINE) {
return (UINT8 *)"EDF";
} else if (policy == LOS_SCHED_IDLE) {
return (UINT8 *)"IDLE";
}
@@ -200,12 +205,10 @@ STATIC UINT8 *ConvertTaskStatusToString(UINT16 taskStatus)
return (UINT8 *)"Suspended";
} else if (taskStatus & OS_TASK_STATUS_DELAY) {
return (UINT8 *)"Delay";
} else if (taskStatus & OS_TASK_STATUS_PEND_TIME) {
return (UINT8 *)"PendTime";
} else if (taskStatus & OS_TASK_STATUS_PENDING) {
if (taskStatus & OS_TASK_STATUS_PEND_TIME) {
return (UINT8 *)"PendTime";
} else {
return (UINT8 *)"Pending";
}
return (UINT8 *)"Pending";
} else if (taskStatus & OS_TASK_STATUS_EXIT) {
return (UINT8 *)"Exit";
}
@@ -413,11 +416,20 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsShellCmdDumpTask(INT32 argc, const CHAR **argv)
}
goto TASK_HELP;
#endif
#ifdef LOSCFG_SCHED_HPF_DEBUG
} else if (strcmp("-t", argv[0]) == 0) {
if (!OsShellShowSchedStatistics()) {
return LOS_OK;
}
goto TASK_HELP;
#endif
#ifdef LOSCFG_SCHED_EDF_DEBUG
} else if (strcmp("-e", argv[0]) == 0) {
if (!OsShellShowEdfSchedStatistics()) {
return LOS_OK;
}
goto TASK_HELP;
#endif
#endif
} else {
goto TASK_HELP;

View File

@@ -0,0 +1,403 @@
/*
* Copyright (c) 2023-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:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "los_sched_pri.h"
#include "los_task_pri.h"
#include "los_process_pri.h"
#include "los_hook.h"
#include "los_tick_pri.h"
#include "los_sys_pri.h"
STATIC EDFRunqueue g_schedEDF;
STATIC VOID EDFDequeue(SchedRunqueue *rq, LosTaskCB *taskCB);
STATIC VOID EDFEnqueue(SchedRunqueue *rq, LosTaskCB *taskCB);
STATIC UINT64 EDFWaitTimeGet(LosTaskCB *taskCB);
STATIC UINT32 EDFWait(LosTaskCB *runTask, LOS_DL_LIST *list, UINT32 ticks);
STATIC VOID EDFWake(LosTaskCB *resumedTask);
STATIC BOOL EDFSchedParamModify(LosTaskCB *taskCB, const SchedParam *param);
STATIC UINT32 EDFSchedParamGet(const LosTaskCB *taskCB, SchedParam *param);
STATIC UINT32 EDFDelay(LosTaskCB *runTask, UINT64 waitTime);
STATIC VOID EDFYield(LosTaskCB *runTask);
STATIC VOID EDFExit(LosTaskCB *taskCB);
STATIC UINT32 EDFSuspend(LosTaskCB *taskCB);
STATIC UINT32 EDFResume(LosTaskCB *taskCB, BOOL *needSched);
STATIC UINT64 EDFTimeSliceGet(const LosTaskCB *taskCB);
STATIC VOID EDFTimeSliceUpdate(SchedRunqueue *rq, LosTaskCB *taskCB, UINT64 currTime);
STATIC INT32 EDFParamCompare(const SchedPolicy *sp1, const SchedPolicy *sp2);
STATIC VOID EDFPriorityInheritance(LosTaskCB *owner, const SchedParam *param);
STATIC VOID EDFPriorityRestore(LosTaskCB *owner, const LOS_DL_LIST *list, const SchedParam *param);
const STATIC SchedOps g_deadlineOps = {
.dequeue = EDFDequeue,
.enqueue = EDFEnqueue,
.waitTimeGet = EDFWaitTimeGet,
.wait = EDFWait,
.wake = EDFWake,
.schedParamModify = EDFSchedParamModify,
.schedParamGet = EDFSchedParamGet,
.delay = EDFDelay,
.yield = EDFYield,
.start = EDFDequeue,
.exit = EDFExit,
.suspend = EDFSuspend,
.resume = EDFResume,
.deadlineGet = EDFTimeSliceGet,
.timeSliceUpdate = EDFTimeSliceUpdate,
.schedParamCompare = EDFParamCompare,
.priorityInheritance = EDFPriorityInheritance,
.priorityRestore = EDFPriorityRestore,
};
STATIC VOID EDFTimeSliceUpdate(SchedRunqueue *rq, LosTaskCB *taskCB, UINT64 currTime)
{
SchedEDF *sched = (SchedEDF *)&taskCB->sp;
LOS_ASSERT(currTime >= taskCB->startTime);
if (taskCB->timeSlice <= 0) {
taskCB->irqUsedTime = 0;
return;
}
INT32 incTime = (currTime - taskCB->startTime - taskCB->irqUsedTime);
LOS_ASSERT(incTime >= 0);
#ifdef LOSCFG_SCHED_EDF_DEBUG
taskCB->schedStat.timeSliceRealTime += incTime;
taskCB->schedStat.allRuntime += (currTime - taskCB->startTime);
#endif
taskCB->timeSlice -= incTime;
taskCB->irqUsedTime = 0;
taskCB->startTime = currTime;
if ((sched->finishTime > currTime) && (taskCB->timeSlice > 0)) {
return;
}
rq->schedFlag |= INT_PEND_RESCH;
if (sched->finishTime <= currTime) {
#ifdef LOSCFG_SCHED_EDF_DEBUG
EDFDebugRecord((UINTPTR *)taskCB, sched->finishTime);
#endif
taskCB->timeSlice = 0;
PrintExcInfo("EDF task %u is timeout, runTime: %d us period: %llu us\n", taskCB->taskID,
(INT32)OS_SYS_CYCLE_TO_US((UINT64)sched->runTime), OS_SYS_CYCLE_TO_US(sched->period));
}
}
STATIC UINT64 EDFTimeSliceGet(const LosTaskCB *taskCB)
{
SchedEDF *sched = (SchedEDF *)&taskCB->sp;
UINT64 endTime = taskCB->startTime + taskCB->timeSlice;
return (endTime > sched->finishTime) ? sched->finishTime : endTime;
}
STATIC VOID DeadlineQueueInsert(EDFRunqueue *rq, LosTaskCB *taskCB)
{
LOS_DL_LIST *root = &rq->root;
if (LOS_ListEmpty(root)) {
LOS_ListTailInsert(root, &taskCB->pendList);
return;
}
LOS_DL_LIST *list = root->pstNext;
do {
LosTaskCB *readyTask = LOS_DL_LIST_ENTRY(list, LosTaskCB, pendList);
if (EDFParamCompare(&readyTask->sp, &taskCB->sp) > 0) {
LOS_ListHeadInsert(list, &taskCB->pendList);
return;
}
list = list->pstNext;
} while (list != root);
LOS_ListHeadInsert(list, &taskCB->pendList);
}
STATIC VOID EDFEnqueue(SchedRunqueue *rq, LosTaskCB *taskCB)
{
LOS_ASSERT(!(taskCB->taskStatus & OS_TASK_STATUS_READY));
EDFRunqueue *erq = rq->edfRunqueue;
SchedEDF *sched = (SchedEDF *)&taskCB->sp;
if (taskCB->timeSlice <= 0) {
#ifdef LOSCFG_SCHED_EDF_DEBUG
UINT64 oldFinish = sched->finishTime;
#endif
UINT64 currTime = OsGetCurrSchedTimeCycle();
if (sched->flags == EDF_INIT) {
sched->finishTime = currTime;
} else if (sched->flags != EDF_NEXT_PERIOD) {
/* The start time of the next period */
sched->finishTime = (sched->finishTime - sched->deadline) + sched->period;
}
/* Calculate the start time of the next period */
while (1) {
/* The deadline of the next period */
UINT64 finishTime = sched->finishTime + sched->deadline;
if ((finishTime <= currTime) || ((sched->finishTime + sched->runTime) > finishTime)) {
/* This period cannot meet the minimum running time, so it is migrated to the next period */
sched->finishTime += sched->period;
continue;
}
break;
}
if (sched->finishTime > currTime) {
/* Wait for the next period to start */
LOS_ListTailInsert(&erq->waitList, &taskCB->pendList);
taskCB->waitTime = OS_SCHED_MAX_RESPONSE_TIME;
if (!OsTaskIsRunning(taskCB)) {
OsSchedTimeoutQueueAdd(taskCB, sched->finishTime);
}
#ifdef LOSCFG_SCHED_EDF_DEBUG
if (oldFinish != sched->finishTime) {
EDFDebugRecord((UINTPTR *)taskCB, oldFinish);
taskCB->schedStat.allRuntime = 0;
taskCB->schedStat.timeSliceRealTime = 0;
taskCB->schedStat.pendTime = 0;
}
#endif
taskCB->taskStatus |= OS_TASK_STATUS_PEND_TIME;
sched->flags = EDF_NEXT_PERIOD;
return;
}
sched->finishTime += sched->deadline;
taskCB->timeSlice = sched->runTime;
sched->flags = EDF_UNUSED;
}
DeadlineQueueInsert(erq, taskCB);
taskCB->taskStatus &= ~(OS_TASK_STATUS_BLOCKED | OS_TASK_STATUS_TIMEOUT);
taskCB->taskStatus |= OS_TASK_STATUS_READY;
}
STATIC VOID EDFDequeue(SchedRunqueue *rq, LosTaskCB *taskCB)
{
(VOID)rq;
LOS_ListDelete(&taskCB->pendList);
taskCB->taskStatus &= ~OS_TASK_STATUS_READY;
}
STATIC VOID EDFExit(LosTaskCB *taskCB)
{
if (taskCB->taskStatus & OS_TASK_STATUS_READY) {
EDFDequeue(OsSchedRunqueue(), taskCB);
} else if (taskCB->taskStatus & OS_TASK_STATUS_PENDING) {
LOS_ListDelete(&taskCB->pendList);
taskCB->taskStatus &= ~OS_TASK_STATUS_PENDING;
}
if (taskCB->taskStatus & (OS_TASK_STATUS_DELAY | OS_TASK_STATUS_PEND_TIME)) {
OsSchedTimeoutQueueDelete(taskCB);
taskCB->taskStatus &= ~(OS_TASK_STATUS_DELAY | OS_TASK_STATUS_PEND_TIME);
}
}
STATIC VOID EDFYield(LosTaskCB *runTask)
{
SchedRunqueue *rq = OsSchedRunqueue();
runTask->timeSlice = 0;
runTask->startTime = OsGetCurrSchedTimeCycle();
EDFEnqueue(rq, runTask);
OsSchedResched();
}
STATIC UINT32 EDFDelay(LosTaskCB *runTask, UINT64 waitTime)
{
runTask->taskStatus |= OS_TASK_STATUS_DELAY;
runTask->waitTime = waitTime;
OsSchedResched();
return LOS_OK;
}
STATIC UINT64 EDFWaitTimeGet(LosTaskCB *taskCB)
{
const SchedEDF *sched = (const SchedEDF *)&taskCB->sp;
if (sched->flags != EDF_WAIT_FOREVER) {
taskCB->waitTime += taskCB->startTime;
}
return (taskCB->waitTime >= sched->finishTime) ? sched->finishTime : taskCB->waitTime;
}
STATIC UINT32 EDFWait(LosTaskCB *runTask, LOS_DL_LIST *list, UINT32 ticks)
{
SchedEDF *sched = (SchedEDF *)&runTask->sp;
runTask->taskStatus |= (OS_TASK_STATUS_PENDING | OS_TASK_STATUS_PEND_TIME);
LOS_ListTailInsert(list, &runTask->pendList);
if (ticks != LOS_WAIT_FOREVER) {
runTask->waitTime = OS_SCHED_TICK_TO_CYCLE(ticks);
} else {
sched->flags = EDF_WAIT_FOREVER;
runTask->waitTime = OS_SCHED_MAX_RESPONSE_TIME;
}
if (OsPreemptableInSched()) {
OsSchedResched();
if (runTask->taskStatus & OS_TASK_STATUS_TIMEOUT) {
runTask->taskStatus &= ~OS_TASK_STATUS_TIMEOUT;
return LOS_ERRNO_TSK_TIMEOUT;
}
}
return LOS_OK;
}
STATIC VOID EDFWake(LosTaskCB *resumedTask)
{
LOS_ListDelete(&resumedTask->pendList);
resumedTask->taskStatus &= ~OS_TASK_STATUS_PENDING;
if (resumedTask->taskStatus & OS_TASK_STATUS_PEND_TIME) {
OsSchedTimeoutQueueDelete(resumedTask);
resumedTask->taskStatus &= ~OS_TASK_STATUS_PEND_TIME;
}
if (!(resumedTask->taskStatus & OS_TASK_STATUS_SUSPENDED)) {
#ifdef LOSCFG_SCHED_EDF_DEBUG
resumedTask->schedStat.pendTime += OsGetCurrSchedTimeCycle() - resumedTask->startTime;
resumedTask->schedStat.pendCount++;
#endif
EDFEnqueue(OsSchedRunqueue(), resumedTask);
}
}
STATIC BOOL EDFSchedParamModify(LosTaskCB *taskCB, const SchedParam *param)
{
SchedRunqueue *rq = OsSchedRunqueue();
SchedEDF *sched = (SchedEDF *)&taskCB->sp;
taskCB->timeSlice = 0;
sched->runTime = (INT32)OS_SYS_US_TO_CYCLE(param->runTimeUs);
sched->period = OS_SYS_US_TO_CYCLE(param->periodUs);
if (taskCB->taskStatus & OS_TASK_STATUS_READY) {
EDFDequeue(rq, taskCB);
sched->deadline = OS_SYS_US_TO_CYCLE(param->deadlineUs);
EDFEnqueue(rq, taskCB);
return TRUE;
}
sched->deadline = OS_SYS_US_TO_CYCLE(param->deadlineUs);
if (taskCB->taskStatus & OS_TASK_STATUS_INIT) {
EDFEnqueue(rq, taskCB);
return TRUE;
}
if (taskCB->taskStatus & OS_TASK_STATUS_RUNNING) {
return TRUE;
}
return FALSE;
}
STATIC UINT32 EDFSchedParamGet(const LosTaskCB *taskCB, SchedParam *param)
{
SchedEDF *sched = (SchedEDF *)&taskCB->sp;
param->policy = sched->policy;
param->runTimeUs = (INT32)OS_SYS_CYCLE_TO_US((UINT64)sched->runTime);
param->deadlineUs = OS_SYS_CYCLE_TO_US(sched->deadline);
param->periodUs = OS_SYS_CYCLE_TO_US(sched->period);
return LOS_OK;
}
STATIC UINT32 EDFSuspend(LosTaskCB *taskCB)
{
return LOS_EOPNOTSUPP;
}
STATIC UINT32 EDFResume(LosTaskCB *taskCB, BOOL *needSched)
{
return LOS_EOPNOTSUPP;
}
STATIC INT32 EDFParamCompare(const SchedPolicy *sp1, const SchedPolicy *sp2)
{
const SchedEDF *param1 = (const SchedEDF *)sp1;
const SchedEDF *param2 = (const SchedEDF *)sp2;
return (INT32)(param1->finishTime - param2->finishTime);
}
STATIC VOID EDFPriorityInheritance(LosTaskCB *owner, const SchedParam *param)
{
(VOID)owner;
(VOID)param;
}
STATIC VOID EDFPriorityRestore(LosTaskCB *owner, const LOS_DL_LIST *list, const SchedParam *param)
{
(VOID)owner;
(VOID)list;
(VOID)param;
}
UINT32 EDFTaskSchedParamInit(LosTaskCB *taskCB, UINT16 policy,
const SchedParam *parentParam,
const LosSchedParam *param)
{
(VOID)parentParam;
SchedEDF *sched = (SchedEDF *)&taskCB->sp;
sched->flags = EDF_INIT;
sched->policy = policy;
sched->runTime = (INT32)OS_SYS_US_TO_CYCLE((UINT64)param->runTimeUs);
sched->deadline = OS_SYS_US_TO_CYCLE(param->deadlineUs);
sched->period = OS_SYS_US_TO_CYCLE(param->periodUs);
sched->finishTime = 0;
taskCB->timeSlice = 0;
taskCB->ops = &g_deadlineOps;
return LOS_OK;
}
VOID EDFProcessDefaultSchedParamGet(SchedParam *param)
{
param->runTimeUs = OS_SCHED_EDF_MIN_RUNTIME;
param->deadlineUs = OS_SCHED_EDF_MAX_DEADLINE;
param->periodUs = param->deadlineUs;
}
VOID EDFSchedPolicyInit(SchedRunqueue *rq)
{
if (ArchCurrCpuid() > 0) {
rq->edfRunqueue = &g_schedEDF;
return;
}
EDFRunqueue *erq = &g_schedEDF;
erq->period = OS_SCHED_MAX_RESPONSE_TIME;
LOS_ListInit(&erq->root);
LOS_ListInit(&erq->waitList);
rq->edfRunqueue = erq;
}

View File

@@ -48,6 +48,7 @@ STATIC VOID IdlePriorityRestore(LosTaskCB *owner, const LOS_DL_LIST *list, const
const STATIC SchedOps g_idleOps = {
.dequeue = IdleDequeue,
.enqueue = IdleEnqueue,
.waitTimeGet = NULL,
.wait = IdleWait,
.wake = IdleWake,
.schedParamModify = NULL,

View File

@@ -47,6 +47,7 @@ STATIC HPFRunqueue g_schedHPF;
STATIC VOID HPFDequeue(SchedRunqueue *rq, LosTaskCB *taskCB);
STATIC VOID HPFEnqueue(SchedRunqueue *rq, LosTaskCB *taskCB);
STATIC UINT64 HPFWaitTimeGet(LosTaskCB *taskCB);
STATIC UINT32 HPFWait(LosTaskCB *runTask, LOS_DL_LIST *list, UINT32 ticks);
STATIC VOID HPFWake(LosTaskCB *resumedTask);
STATIC BOOL HPFSchedParamModify(LosTaskCB *taskCB, const SchedParam *param);
@@ -66,6 +67,7 @@ STATIC VOID HPFPriorityRestore(LosTaskCB *owner, const LOS_DL_LIST *list, const
const STATIC SchedOps g_priorityOps = {
.dequeue = HPFDequeue,
.enqueue = HPFEnqueue,
.waitTimeGet = HPFWaitTimeGet,
.wait = HPFWait,
.wake = HPFWake,
.schedParamModify = HPFSchedParamModify,
@@ -94,7 +96,7 @@ STATIC VOID HPFTimeSliceUpdate(SchedRunqueue *rq, LosTaskCB *taskCB, UINT64 curr
if (sched->policy == LOS_SCHED_RR) {
taskCB->timeSlice -= incTime;
#ifdef LOSCFG_SCHED_DEBUG
#ifdef LOSCFG_SCHED_HPF_DEBUG
taskCB->schedStat.timeSliceRealTime += incTime;
#endif
}
@@ -107,7 +109,7 @@ STATIC VOID HPFTimeSliceUpdate(SchedRunqueue *rq, LosTaskCB *taskCB, UINT64 curr
rq->schedFlag |= INT_PEND_RESCH;
}
#ifdef LOSCFG_SCHED_DEBUG
#ifdef LOSCFG_SCHED_HPF_DEBUG
taskCB->schedStat.allRuntime += incTime;
#endif
}
@@ -215,7 +217,7 @@ STATIC INLINE VOID PriQueInsert(HPFRunqueue *rq, LosTaskCB *taskCB)
sched->initTimeSlice = TimeSliceCalculate(rq, sched->basePrio, sched->priority);
taskCB->timeSlice = sched->initTimeSlice;
PriQueTailInsert(rq, sched->basePrio, &taskCB->pendList, sched->priority);
#ifdef LOSCFG_SCHED_DEBUG
#ifdef LOSCFG_SCHED_HPF_DEBUG
taskCB->schedStat.timeSliceTime = taskCB->schedStat.timeSliceRealTime;
taskCB->schedStat.timeSliceCount++;
#endif
@@ -244,7 +246,7 @@ STATIC INLINE VOID PriQueInsert(HPFRunqueue *rq, LosTaskCB *taskCB)
STATIC VOID HPFEnqueue(SchedRunqueue *rq, LosTaskCB *taskCB)
{
#ifdef LOSCFG_SCHED_DEBUG
#ifdef LOSCFG_SCHED_HPF_DEBUG
if (!(taskCB->taskStatus & OS_TASK_STATUS_RUNNING)) {
taskCB->startTime = OsGetCurrSchedTimeCycle();
}
@@ -301,6 +303,12 @@ STATIC UINT32 HPFDelay(LosTaskCB *runTask, UINT64 waitTime)
return LOS_OK;
}
STATIC UINT64 HPFWaitTimeGet(LosTaskCB *taskCB)
{
taskCB->waitTime += taskCB->startTime;
return taskCB->waitTime;
}
STATIC UINT32 HPFWait(LosTaskCB *runTask, LOS_DL_LIST *list, UINT32 ticks)
{
runTask->taskStatus |= OS_TASK_STATUS_PENDING;
@@ -333,7 +341,7 @@ STATIC VOID HPFWake(LosTaskCB *resumedTask)
}
if (!(resumedTask->taskStatus & OS_TASK_STATUS_SUSPENDED)) {
#ifdef LOSCFG_SCHED_DEBUG
#ifdef LOSCFG_SCHED_HPF_DEBUG
resumedTask->schedStat.pendTime += OsGetCurrSchedTimeCycle() - resumedTask->startTime;
resumedTask->schedStat.pendCount++;
#endif
@@ -508,13 +516,13 @@ STATIC VOID HPFPriorityRestore(LosTaskCB *owner, const LOS_DL_LIST *list, const
VOID HPFTaskSchedParamInit(LosTaskCB *taskCB, UINT16 policy,
const SchedParam *parentParam,
const TSK_INIT_PARAM_S *param)
const LosSchedParam *param)
{
SchedHPF *sched = (SchedHPF *)&taskCB->sp;
sched->policy = policy;
if (param != NULL) {
sched->priority = param->usTaskPrio;
sched->priority = param->priority;
} else {
sched->priority = parentParam->priority;
}

View File

@@ -102,15 +102,26 @@ VOID OsSchedExpireTimeUpdate(VOID)
STATIC INLINE VOID SchedTimeoutTaskWake(SchedRunqueue *rq, UINT64 currTime, LosTaskCB *taskCB, BOOL *needSched)
{
#ifndef LOSCFG_SCHED_DEBUG
(VOID)currTime;
#endif
LOS_SpinLock(&g_taskSpin);
if (OsSchedPolicyIsEDF(taskCB)) {
SchedEDF *sched = (SchedEDF *)&taskCB->sp;
if (sched->finishTime <= currTime) {
if (taskCB->timeSlice >= 0) {
PrintExcInfo("EDF task: %u name: %s is timeout, timeout for %llu us.\n",
taskCB->taskID, taskCB->taskName, OS_SYS_CYCLE_TO_US(currTime - sched->finishTime));
}
taskCB->timeSlice = 0;
}
if (sched->flags == EDF_WAIT_FOREVER) {
taskCB->taskStatus &= ~OS_TASK_STATUS_PEND_TIME;
sched->flags = EDF_UNUSED;
}
}
UINT16 tempStatus = taskCB->taskStatus;
if (tempStatus & (OS_TASK_STATUS_PENDING | OS_TASK_STATUS_DELAY)) {
if (tempStatus & (OS_TASK_STATUS_PEND_TIME | 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 (tempStatus & OS_TASK_STATUS_PEND_TIME) {
taskCB->taskStatus |= OS_TASK_STATUS_TIMEOUT;
LOS_ListDelete(&taskCB->pendList);
taskCB->taskMux = NULL;
@@ -118,7 +129,7 @@ STATIC INLINE VOID SchedTimeoutTaskWake(SchedRunqueue *rq, UINT64 currTime, LosT
}
if (!(tempStatus & OS_TASK_STATUS_SUSPENDED)) {
#ifdef LOSCFG_SCHED_DEBUG
#ifdef LOSCFG_SCHED_HPF_DEBUG
taskCB->schedStat.pendTime += currTime - taskCB->startTime;
taskCB->schedStat.pendCount++;
#endif
@@ -212,8 +223,10 @@ VOID OsSchedRunqueueIdleInit(LosTaskCB *idleTask)
UINT32 OsSchedInit(VOID)
{
for (UINT16 cpuId = 0; cpuId < LOSCFG_KERNEL_CORE_NUM; cpuId++) {
HPFSchedPolicyInit(OsSchedRunqueueByID(cpuId));
for (UINT16 cpuid = 0; cpuid < LOSCFG_KERNEL_CORE_NUM; cpuid++) {
SchedRunqueue *rq = OsSchedRunqueueByID(cpuid);
EDFSchedPolicyInit(rq);
HPFSchedPolicyInit(rq);
}
#ifdef LOSCFG_SCHED_TICK_DEBUG
@@ -247,13 +260,15 @@ INT32 OsSchedParamCompare(const LosTaskCB *task1, const LosTaskCB *task2)
return 0;
}
UINT32 OsSchedParamInit(LosTaskCB *taskCB, UINT16 policy, const SchedParam *parentParam, const TSK_INIT_PARAM_S *param)
UINT32 OsSchedParamInit(LosTaskCB *taskCB, UINT16 policy, const SchedParam *parentParam, const LosSchedParam *param)
{
switch (policy) {
case LOS_SCHED_FIFO:
case LOS_SCHED_RR:
HPFTaskSchedParamInit(taskCB, policy, parentParam, param);
break;
case LOS_SCHED_DEADLINE:
return EDFTaskSchedParamInit(taskCB, policy, parentParam, param);
case LOS_SCHED_IDLE:
IdleTaskSchedParamInit(taskCB);
break;
@@ -271,6 +286,9 @@ VOID OsSchedProcessDefaultSchedParamGet(UINT16 policy, SchedParam *param)
case LOS_SCHED_RR:
HPFProcessDefaultSchedParamGet(param);
break;
case LOS_SCHED_DEADLINE:
EDFProcessDefaultSchedParamGet(param);
break;
case LOS_SCHED_IDLE:
default:
PRINT_ERR("Invalid process-level scheduling policy, %u\n", policy);
@@ -281,12 +299,19 @@ VOID OsSchedProcessDefaultSchedParamGet(UINT16 policy, SchedParam *param)
STATIC LosTaskCB *TopTaskGet(SchedRunqueue *rq)
{
LosTaskCB *newTask = HPFRunqueueTopTaskGet(rq->hpfRunqueue);
if (newTask == NULL) {
newTask = rq->idleTask;
LosTaskCB *newTask = EDFRunqueueTopTaskGet(rq->edfRunqueue);
if (newTask != NULL) {
goto FIND;
}
newTask = HPFRunqueueTopTaskGet(rq->hpfRunqueue);
if (newTask != NULL) {
goto FIND;
}
newTask = rq->idleTask;
FIND:
newTask->ops->start(rq, newTask);
return newTask;
}
@@ -387,7 +412,7 @@ STATIC VOID SchedTaskSwitch(SchedRunqueue *rq, LosTaskCB *runTask, LosTaskCB *ne
OsCpupCycleEndStart(runTask, newTask);
#endif
#ifdef LOSCFG_SCHED_DEBUG
#ifdef LOSCFG_SCHED_HPF_DEBUG
UINT64 waitStartTime = newTask->startTime;
#endif
if (runTask->taskStatus & OS_TASK_STATUS_READY) {
@@ -400,14 +425,14 @@ STATIC VOID SchedTaskSwitch(SchedRunqueue *rq, LosTaskCB *runTask, LosTaskCB *ne
runTask->ops->timeSliceUpdate(rq, runTask, newTask->startTime);
if (runTask->taskStatus & (OS_TASK_STATUS_PEND_TIME | OS_TASK_STATUS_DELAY)) {
OsSchedTimeoutQueueAdd(runTask, runTask->startTime + runTask->waitTime);
OsSchedTimeoutQueueAdd(runTask, runTask->ops->waitTimeGet(runTask));
}
}
UINT64 deadline = newTask->ops->deadlineGet(newTask);
SchedNextExpireTimeSet(newTask->taskID, deadline, runTask->taskID);
#ifdef LOSCFG_SCHED_DEBUG
#ifdef LOSCFG_SCHED_HPF_DEBUG
newTask->schedStat.waitSchedTime += newTask->startTime - waitStartTime;
newTask->schedStat.waitSchedCount++;
runTask->schedStat.runTime = runTask->schedStat.allRuntime;

View File

@@ -99,6 +99,7 @@ UINT32 OsShellShowTickResponse(VOID)
}
#endif
#ifdef LOSCFG_SCHED_HPF_DEBUG
STATIC VOID SchedDataGet(const LosTaskCB *taskCB, UINT64 *runTime, UINT64 *timeSlice,
UINT64 *pendTime, UINT64 *schedWait)
{
@@ -128,6 +129,7 @@ UINT32 OsShellShowSchedStatistics(VOID)
UINT32 taskLinkNum[LOSCFG_KERNEL_CORE_NUM];
UINT32 intSave;
LosTaskCB task;
SchedEDF *sched = NULL;
SCHEDULER_LOCK(intSave);
for (UINT16 cpu = 0; cpu < LOSCFG_KERNEL_CORE_NUM; cpu++) {
@@ -150,6 +152,12 @@ UINT32 OsShellShowSchedStatistics(VOID)
continue;
}
sched = (SchedEDF *)&taskCB->sp;
if (sched->policy == LOS_SCHED_DEADLINE) {
SCHEDULER_UNLOCK(intSave);
continue;
}
(VOID)memcpy_s(&task, sizeof(LosTaskCB), taskCB, sizeof(LosTaskCB));
SCHEDULER_UNLOCK(intSave);
@@ -170,3 +178,168 @@ UINT32 OsShellShowSchedStatistics(VOID)
}
#endif
#ifdef LOSCFG_SCHED_EDF_DEBUG
#define EDF_DEBUG_NODE 20
typedef struct {
UINT32 tid;
INT32 runTimeUs;
UINT64 deadlineUs;
UINT64 periodUs;
UINT64 startTime;
UINT64 finishTime;
UINT64 nextfinishTime;
UINT64 timeSliceUnused;
UINT64 timeSliceRealTime;
UINT64 allRuntime;
UINT64 pendTime;
} EDFDebug;
STATIC EDFDebug g_edfNode[EDF_DEBUG_NODE];
STATIC INT32 g_edfNodePointer = 0;
VOID EDFDebugRecord(UINTPTR *task, UINT64 oldFinish)
{
LosTaskCB *taskCB = (LosTaskCB *)task;
SchedEDF *sched = (SchedEDF *)&taskCB->sp;
SchedParam param;
// when print edf info, will stop record
if (g_edfNodePointer == (EDF_DEBUG_NODE + 1)) {
return;
}
taskCB->ops->schedParamGet(taskCB, &param);
g_edfNode[g_edfNodePointer].tid = taskCB->taskID;
g_edfNode[g_edfNodePointer].runTimeUs =param.runTimeUs;
g_edfNode[g_edfNodePointer].deadlineUs =param.deadlineUs;
g_edfNode[g_edfNodePointer].periodUs =param.periodUs;
g_edfNode[g_edfNodePointer].startTime = taskCB->startTime;
if (taskCB->timeSlice <= 0) {
taskCB->irqUsedTime = 0;
g_edfNode[g_edfNodePointer].timeSliceUnused = 0;
} else {
g_edfNode[g_edfNodePointer].timeSliceUnused = taskCB->timeSlice;
}
g_edfNode[g_edfNodePointer].finishTime = oldFinish;
g_edfNode[g_edfNodePointer].nextfinishTime = sched->finishTime;
g_edfNode[g_edfNodePointer].timeSliceRealTime = taskCB->schedStat.timeSliceRealTime;
g_edfNode[g_edfNodePointer].allRuntime = taskCB->schedStat.allRuntime;
g_edfNode[g_edfNodePointer].pendTime = taskCB->schedStat.pendTime;
g_edfNodePointer++;
if (g_edfNodePointer == EDF_DEBUG_NODE) {
g_edfNodePointer = 0;
}
}
STATIC VOID EDFInfoPrint(int idx)
{
INT32 runTimeUs;
UINT64 deadlineUs;
UINT64 periodUs;
UINT64 startTime;
UINT64 timeSlice;
UINT64 finishTime;
UINT64 nextfinishTime;
UINT64 pendTime;
UINT64 allRuntime;
UINT64 timeSliceRealTime;
CHAR *status = NULL;
startTime = OS_SYS_CYCLE_TO_US(g_edfNode[idx].startTime);
timeSlice = OS_SYS_CYCLE_TO_US(g_edfNode[idx].timeSliceUnused);
finishTime = OS_SYS_CYCLE_TO_US(g_edfNode[idx].finishTime);
nextfinishTime = OS_SYS_CYCLE_TO_US(g_edfNode[idx].nextfinishTime);
pendTime = OS_SYS_CYCLE_TO_US(g_edfNode[idx].pendTime);
allRuntime = OS_SYS_CYCLE_TO_US(g_edfNode[idx].allRuntime);
timeSliceRealTime = OS_SYS_CYCLE_TO_US(g_edfNode[idx].timeSliceRealTime);
runTimeUs = g_edfNode[idx].runTimeUs;
deadlineUs = g_edfNode[idx].deadlineUs;
periodUs = g_edfNode[idx].periodUs;
if (timeSlice > 0) {
status = "TIMEOUT";
} else if (nextfinishTime == finishTime) {
status = "NEXT PERIOD";
} else {
status = "WAIT RUN";
}
PRINTK("%4u%9d%9llu%9llu%12llu%12llu%12llu%9llu%9llu%9llu%9llu %-12s\n",
g_edfNode[idx].tid, runTimeUs, deadlineUs, periodUs,
startTime, finishTime, nextfinishTime, allRuntime, timeSliceRealTime,
timeSlice, pendTime, status);
}
VOID OsEDFDebugPrint(VOID)
{
INT32 max;
UINT32 intSave;
INT32 i;
SCHEDULER_LOCK(intSave);
max = g_edfNodePointer;
g_edfNodePointer = EDF_DEBUG_NODE + 1;
SCHEDULER_UNLOCK(intSave);
PRINTK("\r\nlast %d sched is: (in microsecond)\r\n", EDF_DEBUG_NODE);
PRINTK(" TID RunTime Deadline Period StartTime "
"CurPeriod NextPeriod AllRun RealRun TimeOut WaitTime Status\n");
for (i = max; i < EDF_DEBUG_NODE; i++) {
EDFInfoPrint(i);
}
for (i = 0; i < max; i++) {
EDFInfoPrint(i);
}
SCHEDULER_LOCK(intSave);
g_edfNodePointer = max;
SCHEDULER_UNLOCK(intSave);
}
UINT32 OsShellShowEdfSchedStatistics(VOID)
{
UINT32 intSave;
LosTaskCB task;
UINT64 curTime;
UINT64 deadline;
UINT64 finishTime;
SchedEDF *sched = NULL;
PRINTK("Now Alive EDF Thread:\n");
PRINTK("TID CurTime DeadTime FinishTime taskName\n");
for (UINT32 tid = 0; tid < g_taskMaxNum; tid++) {
LosTaskCB *taskCB = g_taskCBArray + tid;
SCHEDULER_LOCK(intSave);
if (OsTaskIsUnused(taskCB)) {
SCHEDULER_UNLOCK(intSave);
continue;
}
sched = (SchedEDF *)&taskCB->sp;
if (sched->policy != LOS_SCHED_DEADLINE) {
SCHEDULER_UNLOCK(intSave);
continue;
}
(VOID)memcpy_s(&task, sizeof(LosTaskCB), taskCB, sizeof(LosTaskCB));
curTime = OS_SYS_CYCLE_TO_US(HalClockGetCycles());
finishTime = OS_SYS_CYCLE_TO_US(sched->finishTime);
deadline = OS_SYS_CYCLE_TO_US(taskCB->ops->deadlineGet(taskCB));
SCHEDULER_UNLOCK(intSave);
PRINTK("%3u%15llu%15llu%15llu %-32s\n",
task.taskID, curTime, deadline, finishTime, task.taskName);
}
OsEDFDebugPrint();
return LOS_OK;
}
#endif
#endif

View File

@@ -52,7 +52,7 @@ STATIC struct VmPhysArea g_physArea[] = {
struct VmPhysSeg g_vmPhysSeg[VM_PHYS_SEG_MAX];
INT32 g_vmPhysSegNum = 0;
LosVmPhysSeg *OsGVmPhysSegGet()
LosVmPhysSeg *OsGVmPhysSegGet(void)
{
return g_vmPhysSeg;
}

View File

@@ -32,6 +32,7 @@ import("//kernel/liteos_a/liteos.gni")
group("extended") {
deps = [
"blackbox",
"container",
"cppsupport",
"cpup",
"dynload",
@@ -52,6 +53,7 @@ group("extended") {
config("public") {
configs = [
"blackbox:public",
"container:public",
"cpup:public",
"dynload:public",
"hidumper:public",

View File

@@ -113,6 +113,54 @@ config KERNEL_HOOK
default n
depends on KERNEL_EXTKERNEL && DEBUG_VERSION
######################### config options of container ####################
config KERNEL_CONTAINER
bool "Enable container Feature"
default n
depends on KERNEL_VM
config PID_CONTAINER
bool "Enable pid container Feature"
default n
depends on KERNEL_CONTAINER
config UTS_CONTAINER
bool "Enable uts container Feature"
default n
depends on KERNEL_CONTAINER
config MNT_CONTAINER
bool "Enable mnt container Feature"
default n
depends on KERNEL_CONTAINER
config CHROOT
bool "Enable chroot"
default n
depends on MNT_CONTAINER
config IPC_CONTAINER
bool "Enable ipc container Feature"
default n
depends on KERNEL_CONTAINER
config TIME_CONTAINER
bool "Enable time container"
default n
depends on KERNEL_CONTAINER
config USER_CONTAINER
bool "Enable user container"
default n
depends on KERNEL_CONTAINER
config NET_CONTAINER
bool "Enable net container"
default n
depends on KERNEL_CONTAINER
######################### config options of trace #########################
source "kernel/extended/trace/Kconfig"

View File

@@ -0,0 +1,65 @@
# Copyright (c) 2023-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:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of
# conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
# of conditions and the following disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be used
# to endorse or promote products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//kernel/liteos_a/liteos.gni")
module_switch = defined(LOSCFG_KERNEL_CONTAINER)
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [ "los_container.c" ]
if (defined(LOSCFG_IPC_CONTAINER)) {
sources += [ "los_ipc_container.c" ]
}
if (defined(LOSCFG_MNT_CONTAINER)) {
sources += [ "los_mnt_container.c" ]
}
if (defined(LOSCFG_NET_CONTAINER)) {
sources += [ "los_net_container.c" ]
}
if (defined(LOSCFG_PID_CONTAINER)) {
sources += [ "los_pid_container.c" ]
}
if (defined(LOSCFG_TIME_CONTAINER)) {
sources += [ "los_time_container.c" ]
}
if (defined(LOSCFG_USER_CONTAINER)) {
sources += [
"los_credentials.c",
"los_user_container.c",
]
}
if (defined(LOSCFG_UTS_CONTAINER)) {
sources += [ "los_uts_container.c" ]
}
public_configs = [ ":public" ]
}
config("public") {
include_dirs = [ "." ]
}

View File

@@ -0,0 +1,63 @@
# Copyright (c) 2023-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:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of
# conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
# of conditions and the following disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be used
# to endorse or promote products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
include $(LITEOSTOPDIR)/config.mk
MODULE_NAME := $(notdir $(shell pwd))
LOCAL_SRCS := $(wildcard *.c)
ifneq ($(LOSCFG_IPC_CONTAINER), y)
LOCAL_SRCS += $(filter-out los_ipc_container.c, $(LOCAL_SRCS))
endif
ifneq ($(LOSCFG_MNT_CONTAINER), y)
LOCAL_SRCS += $(filter-out los_mnt_container.c, $(LOCAL_SRCS))
endif
ifneq ($(LOSCFG_NET_CONTAINER), y)
LOCAL_SRCS += $(filter-out los_net_container.c, $(LOCAL_SRCS))
endif
ifneq ($(LOSCFG_PID_CONTAINER), y)
LOCAL_SRCS += $(filter-out los_pid_container.c, $(LOCAL_SRCS))
endif
ifneq ($(LOSCFG_TIME_CONTAINER), y)
LOCAL_SRCS += $(filter-out los_time_container.c, $(LOCAL_SRCS))
endif
ifneq ($(LOSCFG_USER_CONTAINER), y)
LOCAL_SRCS += $(filter-out los_credentials.c los_user_container.c, $(LOCAL_SRCS))
endif
ifneq ($(LOSCFG_UTS_CONTAINER), y)
LOCAL_SRCS += $(filter-out los_uts_container.c, $(LOCAL_SRCS))
endif
include $(MODULE)

View File

@@ -33,7 +33,7 @@ module_switch = defined(LOSCFG_BASE_CORE_HILOG)
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {
sources = [
"//base/hiviewdfx/hilog_lite/frameworks/featured/hiview_log.c",
"$HIVIEWDFX_HILOG_LITE_DIR/frameworks/featured/hiview_log.c",
"los_hilog.c",
]
@@ -42,8 +42,8 @@ kernel_module(module_name) {
config("public") {
include_dirs = [
"//base/hiviewdfx/hilog_lite/interfaces/native/kits",
"//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog",
"$HIVIEWDFX_HILOG_LITE_DIR/interfaces/native/kits",
"$HIVIEWDFX_HILOG_LITE_DIR/interfaces/native/kits/hilog",
".",
]
}

View File

@@ -1094,7 +1094,7 @@ ERROR_COPY:
return ret;
}
LITE_OS_SEC_TEXT STATIC UINT32 CheckRecievedMsg(IpcListNode *node, IpcContent *content, LosTaskCB *tcb)
LITE_OS_SEC_TEXT STATIC UINT32 CheckReceivedMsg(IpcListNode *node, IpcContent *content, LosTaskCB *tcb)
{
UINT32 ret = LOS_OK;
if (node == NULL) {
@@ -1184,7 +1184,7 @@ LITE_OS_SEC_TEXT STATIC UINT32 LiteIpcRead(IpcContent *content)
LOS_ListDelete(listNode);
node = LOS_DL_LIST_ENTRY(listNode, IpcListNode, listNode);
SCHEDULER_UNLOCK(intSave);
ret = CheckRecievedMsg(node, content, tcb);
ret = CheckReceivedMsg(node, content, tcb);
if (ret == LOS_OK) {
break;
}

View File

@@ -28,7 +28,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//kernel/liteos_a/liteos.gni")
import("//third_party/NuttX/NuttX.gni")
import("$THIRDPARTY_NUTTX_DIR/NuttX.gni")
module_switch = defined(LOSCFG_KERNEL_PIPE)
module_name = get_path_info(rebase_path("."), "name")

View File

@@ -47,13 +47,13 @@
extern INT32 LOS_Fork(UINT32 flags, const CHAR *name, const TSK_ENTRY_FUNC entry, UINT32 stackSize);
extern INT32 LOS_SetProcessPriority(INT32 pid, UINT16 prio);
extern INT32 LOS_SetProcessPriority(INT32 pid, INT32 prio);
extern INT32 LOS_GetProcessPriority(INT32 pid);
extern INT32 LOS_GetProcessScheduler(INT32 pid);
extern INT32 LOS_GetProcessScheduler(INT32 pid, INT32 *policy, LosSchedParam *schedParam);
extern INT32 LOS_SetProcessScheduler(INT32 pid, UINT16 policy, UINT16 prio);
extern INT32 LOS_SetProcessScheduler(INT32 pid, UINT16 policy, const LosSchedParam *schedParam);
extern UINT32 LOS_GetCurrProcessID(VOID);

View File

@@ -514,8 +514,21 @@ typedef struct tagTskInitParam {
UINT16 consoleID; /**< The console id of task belongs */
UINTPTR processID;
UserTaskParam userParam;
/* edf parameters */
UINT32 runTimeUs;
UINT64 deadlineUs;
UINT64 periodUs;
} TSK_INIT_PARAM_S;
typedef struct {
union {
INT32 priority;
INT32 runTimeUs;
};
INT32 deadlineUs;
INT32 periodUs;
} LosSchedParam;
/**
* @ingroup los_task
* Task name length

View File

@@ -28,11 +28,8 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//kernel/liteos_a/liteos.gni")
MUSLDIR = "$LITEOSTHIRDPARTY/musl"
import("//third_party/optimized-routines/optimized-routines.gni")
import("$MUSLDIR/porting/liteos_a/kernel/musl.gni")
import("$THIRDPARTY_MUSL_DIR/porting/liteos_a/kernel/musl.gni")
import("$THIRDPARTY_OPTIMIZED_ROUTINES_DIR/optimized-routines.gni")
module_switch = defined(LOSCFG_LIBC_MUSL)
module_name = get_path_info(rebase_path("."), "name")

View File

@@ -64,5 +64,6 @@ else
LOCAL_FLAGS += -frounding-math -Wno-unused-but-set-variable
endif
LOCAL_FLAGS += -Wno-shift-op-parentheses -Wno-logical-op-parentheses -Wno-bitwise-op-parentheses -Wno-unknown-pragmas
LOCAL_FLAGS += -Wno-unused-but-set-variable
include $(MODULE)

View File

@@ -27,7 +27,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//kernel/liteos_a/liteos.gni")
import("//third_party/musl/porting/liteos_a_newlib/kernel/newlib.gni")
import("$THIRDPARTY_MUSL_DIR/porting/liteos_a_newlib/kernel/newlib.gni")
module_switch = defined(LOSCFG_LIBC_NEWLIB)
module_name = get_path_info(rebase_path("."), "name")

View File

@@ -28,7 +28,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//kernel/liteos_a/liteos.gni")
import("//third_party/FreeBSD/FreeBSD.gni")
import("$THIRDPARTY_FREEBSD_DIR/FreeBSD.gni")
module_name = get_path_info(rebase_path("."), "name")
kernel_module(module_name) {

View File

@@ -28,7 +28,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//kernel/liteos_a/liteos.gni")
import("//third_party/bounds_checking_function/libsec_src.gni")
import("$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR/libsec_src.gni")
module_switch = defined(LOSCFG_LIB_LIBC)
module_name = get_path_info(rebase_path("."), "name")

View File

@@ -32,6 +32,19 @@ import("$root_out_dir/config.gni")
LITEOSTOPDIR = "//kernel/liteos_a"
LITEOSTHIRDPARTY = "//third_party"
HDFTOPDIR = "//drivers/hdf_core/adapter/khdf/liteos"
HIVIEWDFX_HILOG_LITE_DIR = "//base/hiviewdfx/hilog_lite"
DRIVERS_LITEOS_DIR = "//drivers/liteos"
THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR =
"//third_party/bounds_checking_function"
THIRDPARTY_FATFS_DIR = "//third_party/FatFs"
THIRDPARTY_NUTTX_DIR = "//third_party/NuttX"
THIRDPARTY_MUSL_DIR = "//third_party/musl"
THIRDPARTY_TOYBOX_DIR = "//third_party/toybox"
THIRDPARTY_MKSH_DIR = "//third_party/mksh"
THIRDPARTY_FREEBSD_DIR = "//third_party/FreeBSD"
THIRDPARTY_OPTIMIZED_ROUTINES_DIR = "//third_party/optimized-routines"
THIRDPARTY_GOOGLETEST_DIR = "//third_party/googletest"
KERNEL_LINUX_DIR = "//kernel/linux/linux-5.10"
ARCH = ""
if (defined(LOSCFG_ARCH_ARM_AARCH32)) {
@@ -135,8 +148,8 @@ set_defaults("kernel_module") {
"$LITEOSTOPDIR:los_config",
]
visibility = [
"$LITEOSTOPDIR:*",
":*",
"$LITEOSTOPDIR:*",
"..:*",
"../..:*",
]

View File

@@ -321,7 +321,7 @@ static unsigned int ProcRealProcessIDGet(unsigned int pid)
SCHEDULER_LOCK(intSave);
LosProcessCB *pcb = OsGetPCBFromVpid(pid);
if (pcb == NULL) {
if (OsProcessIsInactive(pcb)) {
SCHEDULER_UNLOCK(intSave);
return 0;
}

View File

@@ -72,10 +72,10 @@ extern unsigned int SysGetGroupId(void);
extern unsigned int SysGetTid(void);
extern void SysSchedYield(int type);
extern int SysSchedGetScheduler(int id, int flag);
extern int SysSchedSetScheduler(int id, int policy, int prio, int flag);
extern int SysSchedGetParam(int id, int flag);
extern int SysSchedSetParam(int id, unsigned int prio, int flag);
extern int SysSetProcessPriority(int which, int who, unsigned int prio);
extern int SysSchedSetScheduler(int id, int policy, const LosSchedParam *userParam, int flag);
extern int SysSchedGetParam(int id, LosSchedParam *userParam, int flag);
extern int SysSchedSetParam(int id, const LosSchedParam *userParam, int flag);
extern int SysSetProcessPriority(int which, int who, int prio);
extern int SysGetProcessPriority(int which, int who);
extern int SysSchedGetPriorityMin(int policy);
extern int SysSchedGetPriorityMax(int policy);

View File

@@ -60,23 +60,44 @@ static int OsPermissionToCheck(unsigned int pid, unsigned int who)
return 0;
}
static int OsUserTaskSchedulerSet(unsigned int tid, unsigned short policy, unsigned short priority, bool policyFlag)
static int UserTaskSchedulerCheck(unsigned int tid, int policy, const LosSchedParam *schedParam, bool policyFlag)
{
int ret;
int processPolicy;
if (OS_TID_CHECK_INVALID(tid)) {
return EINVAL;
}
ret = OsSchedulerParamCheck(policy, TRUE, schedParam);
if (ret != 0) {
return ret;
}
if (policyFlag) {
ret = LOS_GetProcessScheduler(LOS_GetCurrProcessID(), &processPolicy, NULL);
if (ret < 0) {
return -ret;
}
if ((processPolicy != LOS_SCHED_DEADLINE) && (policy == LOS_SCHED_DEADLINE)) {
return EPERM;
} else if ((processPolicy == LOS_SCHED_DEADLINE) && (policy != LOS_SCHED_DEADLINE)) {
return EPERM;
}
}
return 0;
}
static int OsUserTaskSchedulerSet(unsigned int tid, int policy, const LosSchedParam *schedParam, bool policyFlag)
{
int ret;
unsigned int intSave;
bool needSched = false;
SchedParam param = { 0 };
if (OS_TID_CHECK_INVALID(tid)) {
return EINVAL;
}
if (priority > OS_TASK_PRIORITY_LOWEST) {
return EINVAL;
}
if ((policy != LOS_SCHED_FIFO) && (policy != LOS_SCHED_RR)) {
return EINVAL;
ret = UserTaskSchedulerCheck(tid, policy, schedParam, policyFlag);
if (ret != 0) {
return ret;
}
LosTaskCB *taskCB = OS_TCB_FROM_TID(tid);
@@ -88,8 +109,22 @@ static int OsUserTaskSchedulerSet(unsigned int tid, unsigned short policy, unsig
}
taskCB->ops->schedParamGet(taskCB, &param);
param.policy = (policyFlag == true) ? policy : param.policy;
param.priority = priority;
param.policy = (policyFlag == true) ? (UINT16)policy : param.policy;
if ((param.policy == LOS_SCHED_RR) || (param.policy == LOS_SCHED_FIFO)) {
param.priority = schedParam->priority;
} else if (param.policy == LOS_SCHED_DEADLINE) {
#ifdef LOSCFG_SECURITY_CAPABILITY
/* user mode process with privilege of CAP_SCHED_SETPRIORITY can change the priority */
if (!IsCapPermit(CAP_SCHED_SETPRIORITY)) {
SCHEDULER_UNLOCK(intSave);
return EPERM;
}
#endif
param.runTimeUs = schedParam->runTimeUs;
param.deadlineUs = schedParam->deadlineUs;
param.periodUs = schedParam->periodUs;
}
needSched = taskCB->ops->schedParamModify(taskCB, &param);
SCHEDULER_UNLOCK(intSave);
@@ -113,6 +148,7 @@ int SysSchedGetScheduler(int id, int flag)
{
unsigned int intSave;
SchedParam param = { 0 };
int policy;
int ret;
if (flag < 0) {
@@ -137,43 +173,57 @@ int SysSchedGetScheduler(int id, int flag)
id = (int)LOS_GetCurrProcessID();
}
return LOS_GetProcessScheduler(id);
}
int SysSchedSetScheduler(int id, int policy, int prio, int flag)
{
int ret;
if (flag < 0) {
return -OsUserTaskSchedulerSet(id, policy, prio, true);
ret = LOS_GetProcessScheduler(id, &policy, NULL);
if (ret < 0) {
return ret;
}
if (prio < OS_USER_PROCESS_PRIORITY_HIGHEST) {
return -EINVAL;
return policy;
}
int SysSchedSetScheduler(int id, int policy, const LosSchedParam *userParam, int flag)
{
int ret;
LosSchedParam param;
if (LOS_ArchCopyFromUser(&param, userParam, sizeof(LosSchedParam)) != 0) {
return -EFAULT;
}
if (flag < 0) {
return -OsUserTaskSchedulerSet(id, policy, &param, true);
}
if (policy == LOS_SCHED_RR) {
#ifdef LOSCFG_KERNEL_PLIMITS
if (param.priority < OsPidLimitGetPriorityLimit()) {
return -EINVAL;
}
#else
if (param.priority < OS_USER_PROCESS_PRIORITY_HIGHEST) {
return -EINVAL;
}
#endif
}
if (id == 0) {
id = (int)LOS_GetCurrProcessID();
}
#ifdef LOSCFG_KERNEL_PLIMITS
if (prio < OsPidLimitGetPriorityLimit()) {
return -EINVAL;
}
#endif
ret = OsPermissionToCheck(id, LOS_GetCurrProcessID());
if (ret < 0) {
return ret;
}
return OsSetProcessScheduler(LOS_PRIO_PROCESS, id, prio, policy);
return OsSetProcessScheduler(LOS_PRIO_PROCESS, id, policy, &param);
}
int SysSchedGetParam(int id, int flag)
int SysSchedGetParam(int id, LosSchedParam *userParam, int flag)
{
LosSchedParam schedParam = {0};
SchedParam param = { 0 };
unsigned int intSave;
int ret;
if (flag < 0) {
if (OS_TID_CHECK_INVALID(id)) {
@@ -182,7 +232,7 @@ int SysSchedGetParam(int id, int flag)
LosTaskCB *taskCB = OS_TCB_FROM_TID(id);
SCHEDULER_LOCK(intSave);
int ret = OsUserTaskOperatePermissionsCheck(taskCB);
ret = OsUserTaskOperatePermissionsCheck(taskCB);
if (ret != LOS_OK) {
SCHEDULER_UNLOCK(intSave);
return -ret;
@@ -190,25 +240,39 @@ int SysSchedGetParam(int id, int flag)
taskCB->ops->schedParamGet(taskCB, &param);
SCHEDULER_UNLOCK(intSave);
return (int)param.priority;
if (param.policy == LOS_SCHED_DEADLINE) {
schedParam.runTimeUs = param.runTimeUs;
schedParam.deadlineUs = param.deadlineUs;
schedParam.periodUs = param.periodUs;
} else {
schedParam.priority = param.priority;
}
} else {
if (id == 0) {
id = (int)LOS_GetCurrProcessID();
}
if (OS_PID_CHECK_INVALID(id)) {
return -EINVAL;
}
ret = LOS_GetProcessScheduler(id, NULL, &schedParam);
if (ret < 0) {
return ret;
}
}
if (id == 0) {
id = (int)LOS_GetCurrProcessID();
if (LOS_ArchCopyToUser(userParam, &schedParam, sizeof(LosSchedParam))) {
return -EFAULT;
}
if (OS_PID_CHECK_INVALID(id)) {
return -EINVAL;
}
return OsGetProcessPriority(LOS_PRIO_PROCESS, id);
return 0;
}
int SysSetProcessPriority(int which, int who, unsigned int prio)
int SysSetProcessPriority(int which, int who, int prio)
{
int ret;
if (prio < OS_USER_PROCESS_PRIORITY_HIGHEST) {
if (which != LOS_PRIO_PROCESS) {
return -EINVAL;
}
@@ -220,6 +284,10 @@ int SysSetProcessPriority(int which, int who, unsigned int prio)
if (prio < OsPidLimitGetPriorityLimit()) {
return -EINVAL;
}
#else
if (prio < OS_USER_PROCESS_PRIORITY_HIGHEST) {
return -EINVAL;
}
#endif
ret = OsPermissionToCheck(who, LOS_GetCurrProcessID());
@@ -227,22 +295,31 @@ int SysSetProcessPriority(int which, int who, unsigned int prio)
return ret;
}
return OsSetProcessScheduler(which, who, prio, LOS_GetProcessScheduler(who));
return LOS_SetProcessPriority(who, prio);
}
int SysSchedSetParam(int id, unsigned int prio, int flag)
int SysSchedSetParam(int id, const LosSchedParam *userParam, int flag)
{
int ret, policy;
LosSchedParam param;
if (flag < 0) {
return -OsUserTaskSchedulerSet(id, LOS_SCHED_RR, prio, false);
if (LOS_ArchCopyFromUser(&param, userParam, sizeof(LosSchedParam)) != 0) {
return -EFAULT;
}
return -OsUserTaskSchedulerSet(id, LOS_SCHED_RR, &param, false);
}
#ifdef LOSCFG_KERNEL_PLIMITS
if (prio < OsPidLimitGetPriorityLimit()) {
return -EINVAL;
if (id == 0) {
id = (int)LOS_GetCurrProcessID();
}
#endif
return SysSetProcessPriority(LOS_PRIO_PROCESS, id, prio);
ret = LOS_GetProcessScheduler(id, &policy, NULL);
if (ret < 0) {
return ret;
}
return SysSchedSetScheduler(id, policy, userParam, flag);
}
int SysGetProcessPriority(int which, int who)

View File

@@ -169,7 +169,7 @@ SYSCALL_HAND_DEF(__NR_sethostname, SysSetHostName, int, ARG_NUM_2)
SYSCALL_HAND_DEF(__NR_mprotect, SysMprotect, int, ARG_NUM_3)
SYSCALL_HAND_DEF(__NR_getpgid, SysGetProcessGroupID, int, ARG_NUM_1)
SYSCALL_HAND_DEF(__NR_sched_setparam, SysSchedSetParam, int, ARG_NUM_3)
SYSCALL_HAND_DEF(__NR_sched_getparam, SysSchedGetParam, int, ARG_NUM_2)
SYSCALL_HAND_DEF(__NR_sched_getparam, SysSchedGetParam, int, ARG_NUM_3)
SYSCALL_HAND_DEF(__NR_sched_setscheduler, SysSchedSetScheduler, int, ARG_NUM_4)
SYSCALL_HAND_DEF(__NR_sched_getscheduler, SysSchedGetScheduler, int, ARG_NUM_2)
SYSCALL_HAND_DEF(__NR_sched_yield, SysSchedYield, void, ARG_NUM_1)

View File

@@ -39,21 +39,21 @@ declare_args() {
config("liteos_kernel_test_public") {
cflags = [ "-Wno-error" ]
include_dirs = [
"//kernel/liteos_a/kernel/include",
"//kernel/liteos_a/kernel/base/include",
"//kernel/liteos_a/kernel/common",
"//kernel/liteos_a/arch/arm/arm/include",
"//kernel/liteos_a/arch/arm/include",
"//kernel/liteos_a/extended/include",
"//third_party/musl/porting/liteos_a/kernel/include",
"//third_party/bounds_checking_function/include/",
"//kernel/liteos_a/lib/libscrew/include",
"//kernel/liteos_a/fs/vfs",
"//kernel/liteos_a/fs/proc/include",
"//kernel/liteos_a/fs/jffs2/include",
"//kernel/liteos_a/fs/nfs/include",
"//kernel/liteos_a/bsd/compat/linuxkpi/include",
"//kernel/liteos_a/testsuites/kernel/include",
"$LITEOSTOPDIR/kernel/include",
"$LITEOSTOPDIR/kernel/base/include",
"$LITEOSTOPDIR/kernel/common",
"$LITEOSTOPDIR/arch/arm/arm/include",
"$LITEOSTOPDIR/arch/arm/include",
"$LITEOSTOPDIR/extended/include",
"$THIRDPARTY_MUSL_DIR/porting/liteos_a/kernel/include",
"$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR/include/",
"$LITEOSTOPDIR/lib/libscrew/include",
"$LITEOSTOPDIR/fs/vfs",
"$LITEOSTOPDIR/fs/proc/include",
"$LITEOSTOPDIR/fs/jffs2/include",
"$LITEOSTOPDIR/fs/nfs/include",
"$LITEOSTOPDIR/bsd/compat/linuxkpi/include",
"include",
]
if (LOSCFG_TEST_KERNEL_BASE) {

View File

@@ -260,5 +260,5 @@ kernel_module("test_core") {
]
public_configs =
[ "//kernel/liteos_a/testsuites/kernel:liteos_kernel_test_public" ]
[ "$LITEOSTOPDIR/testsuites/kernel:liteos_kernel_test_public" ]
}

View File

@@ -107,5 +107,5 @@ kernel_module("test_ipc") {
]
public_configs =
[ "//kernel/liteos_a/testsuites/kernel:liteos_kernel_test_public" ]
[ "$LITEOSTOPDIR/testsuites/kernel:liteos_kernel_test_public" ]
}

View File

@@ -113,10 +113,24 @@ group("unittest") {
# libc test
if (LOSCFG_USER_TEST_LIBC == true) {
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
deps += [ "libc:liteos_a_libc_unittest_door" ]
deps += [
"libc/io:liteos_a_libc_io_unittest_door",
"libc/misc:liteos_a_libc_misc_unittest_door",
"libc/posix:liteos_a_libc_posix_unittest_door",
"libc/sys:liteos_a_libc_sys_unittest_door",
"libc/time:liteos_a_libc_time_unittest_door",
"libc/util:liteos_a_libc_util_unittest_door",
]
}
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
deps += [ "libc:liteos_a_libc_unittest" ]
deps += [
"libc/io:liteos_a_libc_io_unittest",
"libc/misc:liteos_a_libc_misc_unittest",
"libc/posix:liteos_a_libc_posix_unittest",
"libc/sys:liteos_a_libc_sys_unittest",
"libc/time:liteos_a_libc_time_unittest",
"libc/util:liteos_a_libc_util_unittest",
]
}
}
@@ -133,8 +147,11 @@ group("unittest") {
# process test
if (LOSCFG_USER_TEST_PROCESS_THREAD == true) {
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
deps += [ "process/basic:liteos_a_process_basic_unittest_door" ]
deps += [ "process/lock:liteos_a_process_lock_unittest_door" ]
deps += [
"process/basic/process:liteos_a_process_basic_process_unittest_door",
"process/basic/pthread:liteos_a_process_basic_pthread_unittest_door",
"process/lock:liteos_a_process_lock_unittest_door",
]
if (LOSCFG_USER_TEST_PROCESS_FS == true) {
deps += [ "process/fs:liteos_a_process_fs_unittest_door" ]
}
@@ -143,8 +160,11 @@ group("unittest") {
}
}
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
deps += [ "process/basic:liteos_a_process_basic_unittest" ]
deps += [ "process/lock:liteos_a_process_lock_unittest" ]
deps += [
"process/basic/process:liteos_a_process_basic_process_unittest",
"process/basic/pthread:liteos_a_process_basic_pthread_unittest",
"process/lock:liteos_a_process_lock_unittest",
]
if (LOSCFG_USER_TEST_PROCESS_FS == true) {
deps += [ "process/fs:liteos_a_process_fs_unittest" ]
}

View File

@@ -26,8 +26,6 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//build/lite/config/test.gni")
import("//kernel/liteos_a/testsuites/unittest/config.gni")
import("./config.gni")
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
@@ -40,7 +38,7 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
sources_full = []
sources += sources_full
configs = [ "..:public_config_for_door" ]
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
}
}
@@ -53,6 +51,6 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
sources += sources_smoke
sources += sources_full
configs = [ "..:public_config_for_all" ]
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
}
}

View File

@@ -27,10 +27,11 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//build/lite/config/test.gni")
import("//kernel/liteos_a/liteos.gni")
import("//kernel/liteos_a/testsuites/unittest/config.gni")
common_include_dirs = [
"//third_party/googletest/googletest/include",
"$THIRDPARTY_GOOGLETEST_DIR/googletest/include",
"../common/include",
]

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2013-2019 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:
@@ -42,40 +42,52 @@ static int Testcase(void)
char *workingPath = "/usr/bin";
void *handle = nullptr;
int (*func)(int);
char curPath[1024] = { 0 }; /* 1024, buffer size */
handle = getcwd(curPath, sizeof(curPath));
ICUNIT_ASSERT_NOT_EQUAL(handle, NULL, handle);
ret = chdir(workingPath);
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
handle = dlopen(NULL, RTLD_NOW | RTLD_LOCAL);
ICUNIT_ASSERT_NOT_EQUAL(handle, NULL, handle);
ICUNIT_GOTO_NOT_EQUAL(handle, NULL, 1, EXIT1); /* 1, return value */
ret = dlclose(handle);
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
handle = dlopen(LIBCSO_REAL_PATH, RTLD_NOW);
ICUNIT_ASSERT_NOT_EQUAL(handle, NULL, handle);
ICUNIT_GOTO_NOT_EQUAL(handle, NULL, 1, EXIT1); /* 1, return value */
func = reinterpret_cast<int (*)(int)>(dlsym(handle, SYMBOL_TO_FIND));
ICUNIT_GOTO_NOT_EQUAL(func, NULL, func, EXIT);
ICUNIT_GOTO_EQUAL(func, SYMBOL_TO_MATCH, func, EXIT);
ret = dlclose(handle);
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
handle = dlopen(LIBCSO_RELATIVE_PATH, RTLD_NOW);
ICUNIT_ASSERT_NOT_EQUAL(handle, NULL, handle);
ICUNIT_GOTO_NOT_EQUAL(handle, NULL, 1, EXIT1); /* 1, return value */
func = reinterpret_cast<int (*)(int)>(dlsym(handle, SYMBOL_TO_FIND));
ICUNIT_GOTO_NOT_EQUAL(func, NULL, func, EXIT);
ret = dlclose(handle);
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT);
ret = chdir(curPath);
ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT1);
return 0;
EXIT:
dlclose(handle);
return 0;
EXIT1:
ret = chdir(curPath);
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
return 1; /* 1, return value */
}
void ItTestDynload002(void)

View File

@@ -30,7 +30,7 @@
*/
#include "it_test_exc.h"
static int TestCase(void)
__attribute__((optnone)) static int TestCase(void)
{
int ret;
int status = 0;

View File

@@ -31,7 +31,7 @@
#include "it_test_exc.h"
#include "pthread.h"
static void *ThreadFunc2(void *arg)
__attribute__((optnone)) static void *ThreadFunc2(void *arg)
{
while (1) {
}
@@ -39,7 +39,7 @@ static void *ThreadFunc2(void *arg)
return nullptr;
}
static void *ThreadFunc1(void *arg)
__attribute__((optnone)) static void *ThreadFunc1(void *arg)
{
int *test = nullptr;
*test = 0x1;
@@ -77,7 +77,8 @@ static int TestThread(void)
return 0;
}
static int TestCase(void)
__attribute__((optnone)) static int TestCase(void)
{
int *test = nullptr;
int count = 5;

View File

@@ -34,14 +34,15 @@
#define TEST_THREAD_COUNT 5
static volatile int g_testCondFlag;
static int g_count[TEST_THREAD_COUNT];
static void *ThreadFunc2(void *arg)
__attribute__((optnone)) static void *ThreadFunc2(void *arg)
{
int count = *(int *)arg;
int *test = nullptr;
g_testCondFlag++;
while (g_testCondFlag < 2) {
while (g_testCondFlag < 2) { /* 2, no special meaning */
}
*test = 0x1;
@@ -83,7 +84,7 @@ static int TestThread(void)
return 0;
}
static int TestCase(void)
__attribute__((optnone)) static int TestCase(void)
{
int *test = nullptr;
int count = 5;

View File

@@ -33,7 +33,7 @@
#define TEST_THREAD_COUNT 5
static int TestThread(void)
__attribute__((optnone)) static int TestThread(void)
{
int ret;
int *test = nullptr; // For triggering an exceptioin
@@ -53,7 +53,7 @@ static int TestThread(void)
return 0;
}
static int TestCase(void)
__attribute__((optnone)) static int TestCase(void)
{
int count = 5;
int status = 0;

View File

@@ -30,7 +30,7 @@
*/
#include "it_test_exc.h"
static void Child(void)
__attribute__((optnone)) static void Child(void)
{
while (1) {
printf("@@@@@@@@@@@@@ pid : %d getppid : %d @@@@@@@@@@@@@@@@\n", getpid(), getppid());
@@ -41,7 +41,7 @@ static void TestKill(int sig)
exit(0);
}
static int TestCase(void)
__attribute__((optnone)) static int TestCase(void)
{
int ret;
void (*retptr)(int) = NULL;

View File

@@ -1,5 +1,5 @@
# Copyright (c) 2013-2019 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:
@@ -64,11 +64,11 @@ LOSCFG_USER_TEST_MEM_VM = true
LOSCFG_USER_TEST_PROCESS_THREAD = true
# Module list
LOSCFG_USER_TEST_MUTEX = true
LOSCFG_USER_TEST_PROCESS = true
LOSCFG_USER_TEST_PTHREAD = true
LOSCFG_USER_TEST_RWLOCK = true
LOSCFG_USER_TEST_SPINLOCK = true
LOSCFG_USER_TEST_PROCESS_BASIC_PROCESS = true
LOSCFG_USER_TEST_PROCESS_BASIC_PTHREAD = true
LOSCFG_USER_TEST_PROCESS_LOCK_MUTEX = true
LOSCFG_USER_TEST_PROCESS_LOCK_RWLOCK = true
LOSCFG_USER_TEST_PROCESS_LOCK_SPINLOCK = true
########## extended test ##########
# Control switch for extended function test
@@ -102,15 +102,15 @@ LOSCFG_USER_TEST_FS_VFAT = false
LOSCFG_USER_TEST_LIBC = true
# Module list
LOSCFG_USER_TEST_IO = true
LOSCFG_USER_TEST_MISC = true
LOSCFG_USER_TEST_POSIX_MEM = true
LOSCFG_USER_TEST_POSIX_MQUEUE = true
LOSCFG_USER_TEST_POSIX_PTHREAD = false
LOSCFG_USER_TEST_SYS = true
LOSCFG_USER_TEST_TIME_CLOCK = true
LOSCFG_USER_TEST_TIME_TIMER = true
LOSCFG_USER_TEST_UTIL = true
LOSCFG_USER_TEST_LIBC_IO = true
LOSCFG_USER_TEST_LIBC_MISC = true
LOSCFG_USER_TEST_LIBC_POSIX_MEM = true
LOSCFG_USER_TEST_LIBC_POSIX_MQUEUE = true
LOSCFG_USER_TEST_LIBC_POSIX_PTHREAD = false
LOSCFG_USER_TEST_LIBC_SYS = true
LOSCFG_USER_TEST_LIBC_TIME_CLOCK = true
LOSCFG_USER_TEST_LIBC_TIME_TIMER = true
LOSCFG_USER_TEST_LIBC_UTIL = true
########## net test ##########
# Control switch for network function test

View File

@@ -26,8 +26,6 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//build/lite/config/test.gni")
import("//kernel/liteos_a/testsuites/unittest/config.gni")
import("./config.gni")
config("container_config") {
@@ -69,7 +67,7 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
"..:public_config_for_door",
":container_config",
]
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
}
}
@@ -85,6 +83,6 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
"..:public_config_for_all",
":container_config",
]
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
}
}

View File

@@ -26,10 +26,12 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//build/lite/config/test.gni")
import("//kernel/liteos_a/liteos.gni")
import("//kernel/liteos_a/testsuites/unittest/config.gni")
common_include_dirs = [
"//third_party/googletest/googletest/include",
"$THIRDPARTY_GOOGLETEST_DIR/googletest/include",
"../common/include",
"$TEST_UNITTEST_DIR/container",
]

View File

@@ -26,8 +26,6 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//build/lite/config/test.gni")
import("//kernel/liteos_a/testsuites/unittest/config.gni")
import("./config.gni")
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
@@ -40,7 +38,7 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
sources_full = []
sources += sources_full
configs = [ "..:public_config_for_door" ]
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
}
}
@@ -53,6 +51,6 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
sources += sources_smoke
sources += sources_full
configs = [ "..:public_config_for_all" ]
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
}
}

View File

@@ -27,10 +27,11 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//build/lite/config/test.gni")
import("//kernel/liteos_a/liteos.gni")
import("//kernel/liteos_a/testsuites/unittest/config.gni")
common_include_dirs = [
"//third_party/googletest/googletest/include",
"$THIRDPARTY_GOOGLETEST_DIR/googletest/include",
"../common/include",
]

View File

@@ -26,8 +26,6 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//build/lite/config/test.gni")
import("//kernel/liteos_a/testsuites/unittest/config.gni")
import("./config.gni")
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
@@ -40,7 +38,7 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
sources_full = []
sources += sources_full
configs = [ "..:public_config_for_door" ]
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
}
}
@@ -53,6 +51,6 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
sources += sources_smoke
sources += sources_full
configs = [ "..:public_config_for_all" ]
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
}
}

View File

@@ -27,10 +27,11 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//build/lite/config/test.gni")
import("//kernel/liteos_a/liteos.gni")
import("//kernel/liteos_a/testsuites/unittest/config.gni")
common_include_dirs = [
"//third_party/googletest/googletest/include",
"$THIRDPARTY_GOOGLETEST_DIR/googletest/include",
"../common/include",
]

View File

@@ -53,7 +53,7 @@ static UINT32 Testcase(VOID)
ret = write(pipeFd[1], "hello world", 12); // 12, "hello world" length and '\0'
printf("write first status: %d\n", ret);
if (ret != 12) { // 12, "hello world" length and '\0'
exit(11); // 11, the value of son process unexpect exit, convenient to debug
exit(11); // 11, the value of son process unexpected exit, convenient to debug
}
*sharedflag = 1;
close(pipeFd[1]);

View File

@@ -55,7 +55,7 @@ static UINT32 Testcase(VOID)
ret = write(pipeFd[1], "Hello world", TAR_STR_LEN);
printf("write first status: %d\n", ret);
if (ret != TAR_STR_LEN) {
exit(11); // 11, the value of son process unexpect exit, convenient to debug
exit(11); // 11, the value of son process unexpected exit, convenient to debug
}
*sharedflag = 1;
close(pipeFd[1]);

View File

@@ -69,7 +69,7 @@ static UINT32 Testcase(VOID)
ret = sigaction(SIGCHLD, &oldact, NULL);
if (ret == -1) {
exit(6); // 6, the value of son process unexpect exit, convenient to debug
exit(6); // 6, the value of son process unexpected exit, convenient to debug
}
sleep(1);
printf("---son--cnt check----%d--------\n", g_actionCnt1);

View File

@@ -90,31 +90,31 @@ static int TestCase(void)
printf("errline = %d\n", __LINE__);
exit(-1);
}
ret = kill(10, 31); // 10, kill process pid; 31, sigal.
ret = kill(10, 31); // 10, kill process pid; 31, signal.
if (retValue != -1 || errno != EINVAL) {
printf("errline = %d\n", __LINE__);
exit(-1);
}
ret = kill(10, 32); // 10, kill process pid; 32, sigal.
ret = kill(10, 32); // 10, kill process pid; 32, signal.
if (retValue != -1 || errno != EINVAL) {
printf("errline = %d\n", __LINE__);
exit(-1);
}
ret = kill(2, 32); // 2, kill process pid; 32, sigal.
ret = kill(2, 32); // 2, kill process pid; 32, signal.
if (retValue != -1 || errno != EINVAL) {
printf("errline = %d\n", __LINE__);
exit(-1);
}
printf("test EPERM begin\n");
ret = kill(2, 5); // 2, kill process pid; 5, sigal.
ret = kill(2, 5); // 2, kill process pid; 5, signal.
if (retValue != -1 || errno != EPERM) {
printf("errline = %d\n", __LINE__);
exit(-1);
}
ret = kill(3, 5); // 3, kill process pid; 5, sigal.
ret = kill(3, 5); // 3, kill process pid; 5, signal.
if (retValue != -1 || errno != EPERM) {
printf("errline = %d\n", __LINE__);
exit(-1);
@@ -126,7 +126,7 @@ static int TestCase(void)
exit(-1);
}
ret = kill(1, 5); // 5, kill sigal num .
ret = kill(1, 5); // 5, kill signal num .
if (retValue != -1 || errno != EPERM) {
printf("errline = %d\n", __LINE__);
exit(-1);

View File

@@ -40,7 +40,7 @@ static void SigChildResponse(int signo)
wait(nullptr);
}
/* Register SIGCHLD, through signal to restore the child memery */
/* Register SIGCHLD, through signal to restore the child memory */
static int TestSigKillResp()
{
void (*ret)(int) = nullptr;

View File

@@ -38,7 +38,7 @@ void SigChildResponse(int signo)
wait(nullptr);
}
/* Register SIGCHLD, through signal to restore the child memery */
/* Register SIGCHLD, through signal to restore the child memory */
static int TestSigKillWaitFromSigChild()
{
void (*ret)(int);

View File

@@ -88,7 +88,7 @@ static int TestBlock()
printf("\n\n");
printf("Signal Pause(2)\n");
printf("To test whether pause can relese the signal\n");
printf("To test whether pause can release the signal\n");
alarm(clock);
retValue = sighold(sig);
if (retValue != 0) {

View File

@@ -67,7 +67,7 @@ static UINT32 TestCase()
sigemptyset(&set);
sigprocmask(SIG_SETMASK, &set, NULL);
printf("check invlid sigset ...\n");
printf("check invalid sigset ...\n");
int rt = sigaddset(&set, 0);
ICUNIT_ASSERT_EQUAL(rt, -1, rt);
ICUNIT_ASSERT_EQUAL(errno, EINVAL, errno);
@@ -79,19 +79,19 @@ static UINT32 TestCase()
siginfo_t si;
time1.tv_sec = -1;
printf("check invlid timespec: tv_sec=-1 ...\n");
printf("check invalid timespec: tv_sec=-1 ...\n");
ret = SigtimedwaitFailTest(&set, &si, &time1, EINVAL);
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
time1.tv_sec = 1;
time1.tv_nsec = -1;
printf("check invlid timespec: tv_nsec=-1 ...\n");
printf("check invalid timespec: tv_nsec=-1 ...\n");
ret = SigtimedwaitFailTest(&set, &si, &time1, EINVAL);
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
time1.tv_sec = 1;
time1.tv_nsec = 1000 * 1000 * 1000 + 1; // 1000, set the nsec of time.
printf("check invlid timespec: tv_nsec overflow ...\n");
printf("check invalid timespec: tv_nsec overflow ...\n");
ret = SigtimedwaitFailTest(&set, &si, &time1, EINVAL);
ICUNIT_ASSERT_EQUAL(ret, 0, ret);

View File

@@ -27,8 +27,6 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//build/lite/config/test.gni")
import("//kernel/liteos_a/testsuites/unittest/config.gni")
import("./config.gni")
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
@@ -43,7 +41,7 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
sources_pressure = []
sources += sources_pressure
configs = [ "..:public_config_for_door" ]
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
}
}
@@ -58,7 +56,7 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
sources_pressure = []
sources += sources_pressure
configs = [ "..:public_config_for_all" ]
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
}
}
@@ -74,6 +72,6 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_HIGH) {
sources += sources_full
sources += sources_pressure
configs = [ "..:public_config_for_pressure" ]
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
}
}

View File

@@ -27,10 +27,11 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//build/lite/config/test.gni")
import("//kernel/liteos_a/liteos.gni")
import("//kernel/liteos_a/testsuites/unittest/config.gni")
common_include_dirs = [
"//third_party/googletest/googletest/include",
"$THIRDPARTY_GOOGLETEST_DIR/googletest/include",
"../common/include",
]

View File

@@ -1,121 +0,0 @@
# Copyright (c) 2022-2022 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:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of
# conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
# of conditions and the following disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be used
# to endorse or promote products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//build/lite/config/test.gni")
import("//kernel/liteos_a/testsuites/unittest/config.gni")
common_include_dirs = [
"//third_party/googletest/googletest/include",
"../common/include",
]
sources_entry = [ "../common/osTest.cpp" ]
sources_smoke = []
sources_full = []
# io module
if (LOSCFG_USER_TEST_IO == true) {
import("./io/config.gni")
common_include_dirs += io_include_dirs
sources_entry += io_sources_entry
sources_smoke += io_sources_smoke
sources_full += io_sources_full
}
# misc module
if (LOSCFG_USER_TEST_MISC == true) {
import("./misc/config.gni")
common_include_dirs += misc_include_dirs
sources_entry += misc_sources_entry
sources_smoke += misc_sources_smoke
sources_full += misc_sources_full
}
# posix mem module
if (LOSCFG_USER_TEST_POSIX_MEM == true) {
import("./posix/mem/config.gni")
common_include_dirs += posix_mem_include_dirs
sources_entry += posix_mem_sources_entry
sources_smoke += posix_mem_sources_smoke
sources_full += posix_mem_sources_full
}
# posix mqueue module
if (LOSCFG_USER_TEST_POSIX_MQUEUE == true) {
import("./posix/mqueue/config.gni")
common_include_dirs += posix_mqueue_include_dirs
sources_entry += posix_mqueue_sources_entry
sources_smoke += posix_mqueue_sources_smoke
sources_full += posix_mqueue_sources_full
}
# posix pthread module
if (LOSCFG_USER_TEST_POSIX_PTHREAD == true) {
import("./posix/pthread/config.gni")
common_include_dirs += posix_pthread_include_dirs
sources_entry += posix_pthread_sources_entry
sources_smoke += posix_pthread_sources_smoke
sources_full += posix_pthread_sources_full
}
# sys module
if (LOSCFG_USER_TEST_SYS == true) {
import("./sys/config.gni")
common_include_dirs += sys_include_dirs
sources_entry += sys_sources_entry
sources_smoke += sys_sources_smoke
sources_full += sys_sources_full
}
# time module
if (LOSCFG_USER_TEST_TIME_CLOCK == true) {
import("./time/clock/config.gni")
common_include_dirs += time_clock_include_dirs
sources_entry += time_clock_sources_entry
sources_smoke += time_clock_sources_smoke
sources_full += time_clock_sources_full
}
if (LOSCFG_USER_TEST_TIME_TIMER == true) {
import("./time/timer/config.gni")
common_include_dirs += time_timer_include_dirs
sources_entry += time_timer_sources_entry
sources_smoke += time_timer_sources_smoke
sources_full += time_timer_sources_full
}
# util module
if (LOSCFG_USER_TEST_UTIL == true) {
import("./util/config.gni")
common_include_dirs += util_include_dirs
sources_entry += util_sources_entry
sources_smoke += util_sources_smoke
sources_full += util_sources_full
}

View File

@@ -1,4 +1,4 @@
# Copyright (c) 2022-2022 Huawei Device Co., Ltd. All rights reserved.
# Copyright (c) 2022-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:
@@ -26,20 +26,18 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//build/lite/config/test.gni")
import("//kernel/liteos_a/testsuites/unittest/config.gni")
import("./config.gni")
config("libc_config") {
if (LOSCFG_USER_TEST_POSIX_MQUEUE == true ||
LOSCFG_USER_TEST_POSIX_PTHREAD == true) {
if (LOSCFG_USER_TEST_LIBC_POSIX_MQUEUE == true ||
LOSCFG_USER_TEST_LIBC_POSIX_PTHREAD == true) {
cflags = [ "-O1" ]
cflags_cc = cflags
}
}
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
unittest("liteos_a_libc_unittest_door") {
unittest("liteos_a_libc_io_unittest_door") {
output_extension = "bin"
output_dir = "$root_out_dir/test/unittest/kernel"
include_dirs = common_include_dirs
@@ -47,22 +45,22 @@ if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
sources += sources_smoke
sources_full = []
sources += sources_full
configs = [ "..:public_config_for_door" ]
configs = [ "../..:public_config_for_door" ]
configs += [ ":libc_config" ]
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
}
}
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
unittest("liteos_a_libc_unittest") {
unittest("liteos_a_libc_io_unittest") {
output_extension = "bin"
output_dir = "$root_out_dir/test/unittest/kernel"
include_dirs = common_include_dirs
sources = sources_entry
sources += sources_smoke
sources += sources_full
configs = [ "..:public_config_for_all" ]
configs = [ "../..:public_config_for_all" ]
configs += [ ":libc_config" ]
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
}
}

View File

@@ -1,4 +1,4 @@
# Copyright (c) 2022-2022 Huawei Device Co., Ltd. All rights reserved.
# Copyright (c) 2022-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:
@@ -26,20 +26,33 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//build/lite/config/test.gni")
import("//kernel/liteos_a/liteos.gni")
import("//kernel/liteos_a/testsuites/unittest/config.gni")
io_include_dirs = [ "$TEST_UNITTEST_DIR/libc/io" ]
common_include_dirs = [
"$THIRDPARTY_GOOGLETEST_DIR/googletest/include",
"../../common/include",
]
io_sources_entry = [ "$TEST_UNITTEST_DIR/libc/io/io_test.cpp" ]
sources_entry = [ "../../common/osTest.cpp" ]
io_sources_smoke = [
sources_smoke = []
sources_full = []
libc_io_include_dirs = [ "$TEST_UNITTEST_DIR/libc/io" ]
libc_io_sources_entry = [ "$TEST_UNITTEST_DIR/libc/io/io_test.cpp" ]
libc_io_sources_smoke = [
"$TEST_UNITTEST_DIR/libc/io/smoke/IO_test_005.cpp",
"$TEST_UNITTEST_DIR/libc/io/smoke/IO_test_008.cpp",
"$TEST_UNITTEST_DIR/libc/io/smoke/IO_test_010.cpp",
"$TEST_UNITTEST_DIR/libc/io/smoke/IO_test_013.cpp",
]
io_sources_full = [
libc_io_sources_full = [
"$TEST_UNITTEST_DIR/libc/io/full/IO_test_confstr_001.cpp",
"$TEST_UNITTEST_DIR/libc/io/full/IO_test_dcgettext_001.cpp",
"$TEST_UNITTEST_DIR/libc/io/full/IO_test_dcgettext_002.cpp",
@@ -82,3 +95,11 @@ io_sources_full = [
"$TEST_UNITTEST_DIR/libc/io/full/IO_test_epoll_001.cpp",
"$TEST_UNITTEST_DIR/libc/io/full/IO_test_epoll_002.cpp",
]
# libc io module
if (LOSCFG_USER_TEST_LIBC_IO == true) {
common_include_dirs += libc_io_include_dirs
sources_entry += libc_io_sources_entry
sources_smoke += libc_io_sources_smoke
sources_full += libc_io_sources_full
}

View File

@@ -0,0 +1,66 @@
# Copyright (c) 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:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of
# conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
# of conditions and the following disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be used
# to endorse or promote products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("./config.gni")
config("libc_config") {
if (LOSCFG_USER_TEST_LIBC_POSIX_MQUEUE == true ||
LOSCFG_USER_TEST_LIBC_POSIX_PTHREAD == true) {
cflags = [ "-O1" ]
cflags_cc = cflags
}
}
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
unittest("liteos_a_libc_misc_unittest_door") {
output_extension = "bin"
output_dir = "$root_out_dir/test/unittest/kernel"
include_dirs = common_include_dirs
sources = sources_entry
sources += sources_smoke
sources_full = []
sources += sources_full
configs = [ "../..:public_config_for_door" ]
configs += [ ":libc_config" ]
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
}
}
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
unittest("liteos_a_libc_misc_unittest") {
output_extension = "bin"
output_dir = "$root_out_dir/test/unittest/kernel"
include_dirs = common_include_dirs
sources = sources_entry
sources += sources_smoke
sources += sources_full
configs = [ "../..:public_config_for_all" ]
configs += [ ":libc_config" ]
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
}
}

View File

@@ -1,4 +1,4 @@
# Copyright (c) 2022-2022 Huawei Device Co., Ltd. All rights reserved.
# Copyright (c) 2022-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:
@@ -26,13 +26,26 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//build/lite/config/test.gni")
import("//kernel/liteos_a/liteos.gni")
import("//kernel/liteos_a/testsuites/unittest/config.gni")
misc_include_dirs = [ "$TEST_UNITTEST_DIR/libc/misc" ]
common_include_dirs = [
"$THIRDPARTY_GOOGLETEST_DIR/googletest/include",
"../../common/include",
]
misc_sources_entry = [ "$TEST_UNITTEST_DIR/libc/misc/misc_test.cpp" ]
sources_entry = [ "../../common/osTest.cpp" ]
misc_sources_smoke = [
sources_smoke = []
sources_full = []
libc_misc_include_dirs = [ "$TEST_UNITTEST_DIR/libc/misc" ]
libc_misc_sources_entry = [ "$TEST_UNITTEST_DIR/libc/misc/misc_test.cpp" ]
libc_misc_sources_smoke = [
"$TEST_UNITTEST_DIR/libc/misc/smoke/misc_test_001.cpp",
"$TEST_UNITTEST_DIR/libc/misc/smoke/misc_test_002.cpp",
"$TEST_UNITTEST_DIR/libc/misc/smoke/misc_test_003.cpp",
@@ -41,7 +54,7 @@ misc_sources_smoke = [
"$TEST_UNITTEST_DIR/libc/misc/smoke/misc_test_014.cpp",
]
misc_sources_full = [
libc_misc_sources_full = [
"$TEST_UNITTEST_DIR/libc/misc/full/misc_test_006.cpp",
"$TEST_UNITTEST_DIR/libc/misc/full/misc_test_007.cpp",
"$TEST_UNITTEST_DIR/libc/misc/full/misc_test_008.cpp",
@@ -51,3 +64,11 @@ misc_sources_full = [
"$TEST_UNITTEST_DIR/libc/misc/full/misc_test_012.cpp",
"$TEST_UNITTEST_DIR/libc/misc/full/misc_test_013.cpp",
]
# libc misc module
if (LOSCFG_USER_TEST_LIBC_MISC == true) {
common_include_dirs += libc_misc_include_dirs
sources_entry += libc_misc_sources_entry
sources_smoke += libc_misc_sources_smoke
sources_full += libc_misc_sources_full
}

View File

@@ -0,0 +1,66 @@
# Copyright (c) 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:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of
# conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
# of conditions and the following disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be used
# to endorse or promote products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("./config.gni")
config("libc_config") {
if (LOSCFG_USER_TEST_LIBC_POSIX_MQUEUE == true ||
LOSCFG_USER_TEST_LIBC_POSIX_PTHREAD == true) {
cflags = [ "-O1" ]
cflags_cc = cflags
}
}
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_LOW) {
unittest("liteos_a_libc_posix_unittest_door") {
output_extension = "bin"
output_dir = "$root_out_dir/test/unittest/kernel"
include_dirs = common_include_dirs
sources = sources_entry
sources += sources_smoke
sources_full = []
sources += sources_full
configs = [ "../..:public_config_for_door" ]
configs += [ ":libc_config" ]
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
}
}
if (LOSCFG_USER_TEST_LEVEL >= TEST_LEVEL_MIDDLE) {
unittest("liteos_a_libc_posix_unittest") {
output_extension = "bin"
output_dir = "$root_out_dir/test/unittest/kernel"
include_dirs = common_include_dirs
sources = sources_entry
sources += sources_smoke
sources += sources_full
configs = [ "../..:public_config_for_all" ]
configs += [ ":libc_config" ]
deps = [ "$THIRDPARTY_BOUNDS_CHECKING_FUNCTION_DIR:libsec_shared" ]
}
}

View File

@@ -0,0 +1,69 @@
# Copyright (c) 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:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of
# conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
# of conditions and the following disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be used
# to endorse or promote products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//build/lite/config/test.gni")
import("//kernel/liteos_a/liteos.gni")
import("//kernel/liteos_a/testsuites/unittest/config.gni")
common_include_dirs = [
"$THIRDPARTY_GOOGLETEST_DIR/googletest/include",
"../../common/include",
]
sources_entry = [ "../../common/osTest.cpp" ]
sources_smoke = []
sources_full = []
# libc posix mem module
if (LOSCFG_USER_TEST_LIBC_POSIX_MEM == true) {
import("./mem/config.gni")
common_include_dirs += libc_posix_mem_include_dirs
sources_entry += libc_posix_mem_sources_entry
sources_smoke += libc_posix_mem_sources_smoke
sources_full += libc_posix_mem_sources_full
}
# libc posix mqueue module
if (LOSCFG_USER_TEST_LIBC_POSIX_MQUEUE == true) {
import("./mqueue/config.gni")
common_include_dirs += libc_posix_mqueue_include_dirs
sources_entry += libc_posix_mqueue_sources_entry
sources_smoke += libc_posix_mqueue_sources_smoke
sources_full += libc_posix_mqueue_sources_full
}
# libc posix pthread module
if (LOSCFG_USER_TEST_LIBC_POSIX_PTHREAD == true) {
import("./pthread/config.gni")
common_include_dirs += libc_posix_pthread_include_dirs
sources_entry += libc_posix_pthread_sources_entry
sources_smoke += libc_posix_pthread_sources_smoke
sources_full += libc_posix_pthread_sources_full
}

View File

@@ -1,4 +1,4 @@
# Copyright (c) 2022-2022 Huawei Device Co., Ltd. All rights reserved.
# Copyright (c) 2022-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:
@@ -26,16 +26,17 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import("//build/lite/config/test.gni")
import("//kernel/liteos_a/testsuites/unittest/config.gni")
posix_mem_include_dirs = [ "$TEST_UNITTEST_DIR/libc/posix/mem" ]
libc_posix_mem_include_dirs = [ "$TEST_UNITTEST_DIR/libc/posix/mem" ]
posix_mem_sources_entry =
libc_posix_mem_sources_entry =
[ "$TEST_UNITTEST_DIR/libc/posix/mem/posix_mem_test.cpp" ]
posix_mem_sources_smoke = [
libc_posix_mem_sources_smoke = [
"$TEST_UNITTEST_DIR/libc/posix/mem/smoke/It_posix_mem_001.cpp",
"$TEST_UNITTEST_DIR/libc/posix/mem/smoke/It_posix_mem_003.cpp",
]
posix_mem_sources_full = []
libc_posix_mem_sources_full = []

Some files were not shown because too many files have changed in this diff Show More