Commit Graph

19 Commits

Author SHA1 Message Date
LiteOS2021 4b607fd074 fix(posix接口融合): posix接口融合,接口规范兼容性修改
posix接口融合,接口规范兼容性修改

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

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

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

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

Signed-off-by: LiteOS2021 <dinglu@huawei.com>
2022-02-10 16:41:12 +08:00
LiteOS2021 207efc15b8 fix(posix): posix兼容回退
posix兼容回退

Signed-off-by: LiteOS2021 <dinglu@huawei.com>
2022-01-30 23:09:20 +08:00
LiteOS 39558ae1a3 Merge branch 'master' of gitee.com:openharmony/kernel_liteos_m into master
Signed-off-by: LiteOS2021 <dinglu@huawei.com>
2022-01-29 19:30:28 +08:00
LiteOS2021 e0b12758da fix(posix): posix接口融合,接口规范兼容性修改
posix接口融合,接口规范兼容性修改

BREAKING CHANGE:
接口修改:
calloc
pthread_mutex_init
mq_unlink
pthread_join
pthread_exit
pthread_attr_init
pthread_attr_destroy
pthread_condattr_destroy
pthread_cond_timedwait
pthread_mutexattr_init
pthread_mutexattr_settype
pthread_mutex_destroy
pthread_mutex_timedlock
pthread_mutex_trylockk
pthread_mutex_unlock
sem_getvalue

新增接口:
CheckForCancel
pthread_setcancelstate
pthread_setcanceltype
pthread_once
pthread_setschedprio
pthread_attr_setstack
pthread_attr_getstack
pthread_condattr_getpshared
pthread_condattr_setpshared
pthread_condattr_getclock
pthread_mutexattr_gettype
CheckMutexAttr
OsMuxPreCheck
sem_trywait

接口变化:
mq_getsetattr 改为内部接口OsMqGetSetAttr

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

Signed-off-by: LiteOS2021 <dinglu@huawei.com>
2022-01-29 16:57:49 +08:00
likailong 05642f05ae feat: 支持select.h的FD_SETSIZE宏配置
1. FD_SETSIZE由普通文件+网络文件的文件句柄个数之和决定。
2. 以前vfs_config.h引入fatfs.h和lfs_api.h又会引入其他头文件,
导致变异问题。因此需要将配置宏拆分出来放到fatfs_conf.h和
lfs_conf.h 头文件中。
3. lwipopts.h会提供网络的句柄个数,依赖FD_SETSIZE,而select.h会提供FD_SETSIZE,
依赖网络句柄个数,因此会形成相互依赖的情况,需要通过顺序来解决。
4. 网络中新增ntohl的定义。

close: #I4RYK4

Signed-off-by: likailong <likailong@huawei.com>
2022-01-24 17:24:26 +08:00
openharmony_ci fede33b32a
!568 liteos-m kernel 部件标准化
Merge pull request !568 from Hongjin Li/lihongjin/br_dev
2022-01-22 03:45:24 +00:00
openharmony_ci 911043ed4b
!541 fix: 补充newlib库对curl的支持
Merge pull request !541 from Kiita/220115_curl
2022-01-20 09:41:31 +00:00
Kiita bd04d9f29a fix: 将curl依赖的函数新增至newlib库
re #I4RG71
Signed-off-by: yansira <yansira@hotmail.com>
Change-Id: I9bd13f7232015f1ec0da383f7063936a2745ee71
2022-01-19 18:17:03 +08:00
Hongjin Li 9314b2fe81 chore: liteos-m kernel 部件标准化
1、添加liteos-m kernel的部件描述文件bundle.json
2、依赖三方开源软件的编译脚本修改,取消直接include头文件,改为引用三方开源软件提供的公共配置。

Signed-off-by: Hongjin Li <lihongjin1@huawei.com>
Change-Id: I345c105a75c5cd87144c821fae123abf1f53e9f7
2022-01-19 17:44:49 +08:00
yinjiaming 194ac5898d fix: 当前仓代码编译告警的问题
【背景】
当前仓代码存在编译告警需要处理

【修改方案】
在测试用例中屏蔽了-Werror选项
在对应的代码处添加了相应函数的声明头文件

【影响】
对现有的产品编译不会有影响。

re #I4N50W

Signed-off-by: yinjiaming <yinjiaming@huawei.com>
Change-Id: I7dc1e38105aa3d60f9f991f34f88875cccb48463
2022-01-19 02:27:14 +00:00
SimonLi 25a1eb522d feati(newlib): 新增newlib的uio的接口支持
Signed-off-by: SimonLi <likailong@huawei.com>
2022-01-17 19:16:59 +08:00
arvinzzz 93f616b64e fix: 补充net相关头文件
Signed-off-by: arvinzzz <zhaotianyu9@huawei.com>
Change-Id: I32f713800b5451bfd5350c10273f1513366d473a
2022-01-17 11:57:29 +08:00
zhushengle ce5357eee1 feat: newlib支持pthread_equal
Close #I4QERS
Signed-off-by: zhushengle <zhushengle@huawei.com>
Change-Id: Ife2c6afdd47b4bc0407e07f6f629716d4d0f2d1e
2022-01-11 21:27:57 +08:00
zhushengle 65f04bf093 fix: 修复newlib缺省PTHREAD_KEYS_MAX 问题
Close #I4OX47
Signed-off-by: zhushengle <zhushengle@huawei.com>
Change-Id: I4c6b07a77dca5eb5b24f462e639ff173f06d5da0
2021-12-31 15:38:18 +08:00
arvinzzz 8d0ced2069 fix: 修复公版gcc编译内核,调用calloc崩溃
使用内核提供的calloc接口替换工具链的实现

close: #I4OFG6

Signed-off-by: arvinzzz <zhaotianyu9@huawei.com>
Change-Id: Ia979f2b613c8bab89b5df3aa4bd340f6cc6fabd7
2021-12-28 16:12:26 +08:00
arvinzzz f7400fbcb2 fix: 添加newlib对ipv6的支持
补充业务中需要的ipv6相关宏定义

close: #I4M1DB

Signed-off-by: arvinzzz <zhaotianyu9@huawei.com>
Change-Id: I6835fb0673874ed8efff01c8e4f79c2d64ea0d46
2021-12-18 19:35:10 +08:00
yangjian 8594ee469a feat: adapt net
Signed-off-by: yangjian <jianyang@bestechnic.com>
Change-Id: I91d1ef2b5b77be7ec84af939db202a8b06a9b68f
2021-12-09 21:08:04 +08:00
arvinzzz 885027dc91 feature: newlib支持lwip
close: #I4LPB2

Signed-off-by: arvinzzz <zhaotianyu9@huawei.com>
Change-Id: I01fcc0ef35e69103562d4c59e52b335a5695dfc7
2021-12-08 22:06:12 +08:00
arvinzzz 753d86014b feature: 支持newlib与musl切换
系统支持newlib,并且可以与musl-C自由切换

1. 新增newlib支持,适配newlib的预留钩子,针对系统能力适配newlib头文件(补充宏定义,结构体定义,posix能力开关),
  采用标准C与自研posix接口声明与结构体定义混合作为C库
2. 梳理kal的依赖关系,kal作为内核对外提供的标准接口,下属包含cmsis、libc、posix。
  cmsis为内核对cmsis接口的支持,libc为内核对三方C库的适配及使用,posix为内核自研提供的posix标准接口。
  若采用musl-C,则kal中选取libc/musl,posix共同作为C库对外支持;
  若采用newlib-C,则kal中选取libc/newlib,部分posix共同作为C库对外支持。
3. fs整理,components/fs下提供基于posix标准的接口改为内部对外接口,供musl以及newlib切换 适配使用

close: #I4ENQ1

Signed-off-by: arvinzzz <zhaotianyu9@huawei.com>
Change-Id: I72eda5ac5499f72c67e800e22b0f39eb288f2b94
2021-12-04 21:43:55 +08:00