Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lfmiao0
rt-thread
提交
160d4486
R
rt-thread
项目概览
lfmiao0
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
160d4486
编写于
9月 13, 2021
作者:
G
guo
提交者:
GitHub
9月 13, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #5051 from mysterywolf/be_libc
[libc标准化] 使用标准poll.h代替dfs_poll.h
上级
38baf89d
c3606887
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
66 addition
and
48 deletion
+66
-48
components/dfs/SConscript
components/dfs/SConscript
+1
-1
components/dfs/include/dfs_poll.h
components/dfs/include/dfs_poll.h
+1
-32
components/dfs/src/dfs_poll.c
components/dfs/src/dfs_poll.c
+1
-1
components/dfs/src/dfs_select.c
components/dfs/src/dfs_select.c
+1
-1
components/drivers/serial/serial.c
components/drivers/serial/serial.c
+1
-1
components/drivers/serial/serial_v2.c
components/drivers/serial/serial_v2.c
+1
-1
components/drivers/src/pipe.c
components/drivers/src/pipe.c
+1
-1
components/libc/compilers/common/poll.h
components/libc/compilers/common/poll.h
+49
-0
components/libc/compilers/common/sys/time.h
components/libc/compilers/common/sys/time.h
+3
-3
components/lwp/lwp_syscall.c
components/lwp/lwp_syscall.c
+1
-1
components/net/at/at_socket/at_socket.c
components/net/at/at_socket/at_socket.c
+1
-1
components/net/sal_socket/impl/af_inet_at.c
components/net/sal_socket/impl/af_inet_at.c
+1
-1
components/net/sal_socket/impl/af_inet_lwip.c
components/net/sal_socket/impl/af_inet_lwip.c
+1
-1
components/net/sal_socket/socket/net_sockets.c
components/net/sal_socket/socket/net_sockets.c
+1
-1
components/utilities/rt-link/src/rtlink_dev.c
components/utilities/rt-link/src/rtlink_dev.c
+1
-1
examples/rt-link/rtlink_dev_example.c
examples/rt-link/rtlink_dev_example.c
+1
-1
未找到文件。
components/dfs/SConscript
浏览文件 @
160d4486
...
...
@@ -11,7 +11,7 @@ cwd = GetCurrentDir()
CPPPATH
=
[
cwd
+
"/include"
]
if
GetDepend
(
'RT_USING_POSIX'
):
src
+=
[
'src/
poll.c'
,
'src/
select.c'
]
src
+=
[
'src/
dfs_poll.c'
,
'src/dfs_
select.c'
]
group
=
DefineGroup
(
'Filesystem'
,
src
,
depend
=
[
'RT_USING_DFS'
],
CPPPATH
=
CPPPATH
)
...
...
components/dfs/include/dfs_poll.h
浏览文件 @
160d4486
...
...
@@ -10,37 +10,6 @@
#ifndef DFS_POLL_H__
#define DFS_POLL_H__
#include <rtthread.h>
#ifdef RT_USING_POSIX
#include <sys/time.h>
/* for struct timeval */
#if !defined(POLLIN) && !defined(POLLOUT)
#define POLLIN (0x01)
#define POLLRDNORM (0x01)
#define POLLRDBAND (0x01)
#define POLLPRI (0x01)
#define POLLOUT (0x02)
#define POLLWRNORM (0x02)
#define POLLWRBAND (0x02)
#define POLLERR (0x04)
#define POLLHUP (0x08)
#define POLLNVAL (0x10)
typedef
unsigned
int
nfds_t
;
struct
pollfd
{
int
fd
;
short
events
;
short
revents
;
};
#endif
/* !defined(POLLIN) && !defined(POLLOUT) */
#define POLLMASK_DEFAULT (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM)
int
poll
(
struct
pollfd
*
fds
,
nfds_t
nfds
,
int
timeout
);
#endif
/* RT_USING_POSIX */
#include <poll.h>
#endif
/* DFS_POLL_H__ */
components/dfs/src/poll.c
→
components/dfs/src/
dfs_
poll.c
浏览文件 @
160d4486
...
...
@@ -17,7 +17,7 @@
#include <dfs.h>
#include <dfs_file.h>
#include <dfs_posix.h>
#include <
dfs_
poll.h>
#include <poll.h>
#ifdef RT_USING_POSIX
...
...
components/dfs/src/select.c
→
components/dfs/src/
dfs_
select.c
浏览文件 @
160d4486
...
...
@@ -11,7 +11,7 @@
#include <dfs_fs.h>
#include <dfs_posix.h>
#include <
dfs_
poll.h>
#include <poll.h>
#include <dfs_select.h>
#ifdef RT_USING_POSIX
...
...
components/drivers/serial/serial.c
浏览文件 @
160d4486
...
...
@@ -38,7 +38,7 @@
#ifdef RT_USING_POSIX
#include <dfs_posix.h>
#include <
dfs_
poll.h>
#include <poll.h>
#include <sys/ioctl.h>
#ifdef RT_USING_POSIX_TERMIOS
...
...
components/drivers/serial/serial_v2.c
浏览文件 @
160d4486
...
...
@@ -18,7 +18,7 @@
#ifdef RT_USING_POSIX
#include <dfs_posix.h>
#include <
dfs_
poll.h>
#include <poll.h>
#include <sys/ioctl.h>
#ifdef getc
...
...
components/drivers/src/pipe.c
浏览文件 @
160d4486
...
...
@@ -16,7 +16,7 @@
#ifdef RT_USING_POSIX
#include <dfs_file.h>
#include <dfs_posix.h>
#include <
dfs_
poll.h>
#include <poll.h>
#include <sys/ioctl.h>
static
int
pipe_fops_open
(
struct
dfs_fd
*
fd
)
...
...
components/libc/compilers/common/poll.h
0 → 100644
浏览文件 @
160d4486
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2021-09-11 Meco Man First version
*/
#ifndef __POLL_H__
#define __POLL_H__
#ifdef __cplusplus
extern
"C"
{
#endif
#if !defined(POLLIN) && !defined(POLLOUT)
#define POLLIN (0x01)
#define POLLRDNORM (0x01)
#define POLLRDBAND (0x01)
#define POLLPRI (0x01)
#define POLLOUT (0x02)
#define POLLWRNORM (0x02)
#define POLLWRBAND (0x02)
#define POLLERR (0x04)
#define POLLHUP (0x08)
#define POLLNVAL (0x10)
typedef
unsigned
int
nfds_t
;
struct
pollfd
{
int
fd
;
short
events
;
short
revents
;
};
#endif
/* !defined(POLLIN) && !defined(POLLOUT) */
#define POLLMASK_DEFAULT (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM)
int
poll
(
struct
pollfd
*
fds
,
nfds_t
nfds
,
int
timeout
);
#ifdef __cplusplus
}
#endif
#endif
/* __POLL_H__ */
components/libc/compilers/common/sys/time.h
浏览文件 @
160d4486
...
...
@@ -8,8 +8,8 @@
* 2020-09-07 Meco Man combine gcc armcc iccarm
* 2021-02-12 Meco Man move all definitions located in <clock_time.h> to this file
*/
#ifndef _
SYS_TIME_H
_
#define _
SYS_TIME_H
_
#ifndef _
_SYS_TIME_H_
_
#define _
_SYS_TIME_H_
_
#include <rtconfig.h>
#include <rtdef.h>
...
...
@@ -73,7 +73,7 @@ struct timespec {
};
#endif
/*
posix
clock and timer */
/*
POSIX
clock and timer */
#define MILLISECOND_PER_SECOND 1000UL
#define MICROSECOND_PER_SECOND 1000000UL
#define NANOSECOND_PER_SECOND 1000000000UL
...
...
components/lwp/lwp_syscall.c
浏览文件 @
160d4486
...
...
@@ -13,7 +13,7 @@
#include <lwp_mem.h>
#include <lwp_syscall.h>
#include <
dfs_
poll.h>
#include <poll.h>
#include <dfs_select.h>
#if (defined(RT_USING_SAL) && defined(SAL_USING_POSIX))
...
...
components/net/at/at_socket/at_socket.c
浏览文件 @
160d4486
...
...
@@ -19,7 +19,7 @@
#include <at_device.h>
#ifdef SAL_USING_POSIX
#include <
dfs_
poll.h>
#include <poll.h>
#endif
#include <arpa/inet.h>
...
...
components/net/sal_socket/impl/af_inet_at.c
浏览文件 @
160d4486
...
...
@@ -19,7 +19,7 @@
#include <netdev.h>
#ifdef SAL_USING_POSIX
#include <
dfs_
poll.h>
#include <poll.h>
#endif
#ifdef SAL_USING_AT
...
...
components/net/sal_socket/impl/af_inet_lwip.c
浏览文件 @
160d4486
...
...
@@ -17,7 +17,7 @@
#include <lwip/netif.h>
#ifdef SAL_USING_POSIX
#include <
dfs_
poll.h>
#include <poll.h>
#endif
#include <sal.h>
...
...
components/net/sal_socket/socket/net_sockets.c
浏览文件 @
160d4486
...
...
@@ -11,7 +11,7 @@
#include <dfs.h>
#include <dfs_file.h>
#include <
dfs_
poll.h>
#include <poll.h>
#include <dfs_net.h>
#include <sys/errno.h>
#include <sys/socket.h>
...
...
components/utilities/rt-link/src/rtlink_dev.c
浏览文件 @
160d4486
...
...
@@ -21,7 +21,7 @@
#ifdef RT_USING_POSIX
#include <dfs_posix.h>
#include <
dfs_
poll.h>
#include <poll.h>
int
rtlink_fops_open
(
struct
dfs_fd
*
fd
)
{
...
...
examples/rt-link/rtlink_dev_example.c
浏览文件 @
160d4486
...
...
@@ -47,7 +47,7 @@ static rt_err_t rtlink_dev_tx_done(rt_device_t dev, void *buffer)
#ifdef RT_USING_POSIX
#include <dfs_posix.h>
#include <
dfs_
poll.h>
#include <poll.h>
#include <dfs_select.h>
#define RTLINK01_PATH "/dev/rtlink01"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录