Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
RT-Thread
rt-thread
提交
1f52f79d
R
rt-thread
项目概览
RT-Thread
/
rt-thread
大约 1 年 前同步成功
通知
774
Star
8911
Fork
4735
代码
文件
提交
分支
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,发现更多精彩内容 >>
提交
1f52f79d
编写于
5月 04, 2015
作者:
B
Bernard Xiong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[pthreads] The pthread component is depended to libc component.
上级
0af01110
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
9 addition
and
77 deletion
+9
-77
components/pthreads/SConscript
components/pthreads/SConscript
+1
-1
components/pthreads/posix_types.h
components/pthreads/posix_types.h
+8
-76
未找到文件。
components/pthreads/SConscript
浏览文件 @
1f52f79d
...
...
@@ -3,6 +3,6 @@ from building import *
src
=
Glob
(
'*.c'
)
CPPPATH
=
[
RTT_ROOT
+
'/components/pthreads'
]
group
=
DefineGroup
(
'pthreads'
,
src
,
depend
=
[
'RT_USING_PTHREADS'
],
CPPPATH
=
CPPPATH
)
group
=
DefineGroup
(
'pthreads'
,
src
,
depend
=
[
'RT_USING_PTHREADS'
,
'RT_USING_LIBC'
],
CPPPATH
=
CPPPATH
)
Return
(
'group'
)
components/pthreads/posix_types.h
浏览文件 @
1f52f79d
...
...
@@ -27,90 +27,22 @@
#include <rtthread.h>
/* compatible in different compiler and C runtime library */
#ifdef RT_USING_NEWLIB
/* normarlly, GNU GCC will use newlib as C runtime library */
#include <sys/types.h>
#include <sys/time.h>
#include <sys/signal.h>
#include <sys/fcntl.h>
#include <errno.h>
#include <stdarg.h>
#ifndef ESHUTDOWN
#define ESHUTDOWN 180
#endif
#else
/* ARM compiler and IAR compiler */
#if defined(__CC_ARM) || defined(__IAR_SYSTEMS_ICC__)
#include <stddef.h>
#include <stdarg.h>
#include <string.h>
typedef
rt_int32_t
clockid_t
;
typedef
rt_int32_t
key_t
;
/* Used for interprocess communication. */
typedef
rt_int32_t
pid_t
;
/* Used for process IDs and process group IDs. */
typedef
signed
long
ssize_t
;
/* Used for a count of bytes or an error indication. */
typedef
signed
long
time_t
;
/* Used for time in seconds. */
struct
timespec
{
time_t
tv_sec
;
/* seconds */
long
tv_nsec
;
/* nanoseconds */
};
struct
timeval
{
long
tv_sec
;
/* seconds */
long
tv_usec
;
/* microseconds */
};
#ifdef RT_USING_LWIP
#include <lwip/arch.h>
#else
#define EPERM 1
/* Operation not permitted */
#define ENOENT 2
/* No such file or directory */
#define ESRCH 3
/* No such process */
#define EINTR 4
/* Interrupted system call */
#define EBADF 9
/* Bad file number */
#define EAGAIN 11
/* Try again */
#define ENOMEM 12
/* Out of memory */
#define EBUSY 16
/* Device or resource busy */
#define EEXIST 17
/* File exists */
#define EINVAL 22
/* Invalid argument */
#define ENFILE 23
/* File table overflow */
#define EDEADLK 45
/* Resource deadlock would occur */
#define EBADMSG 77
/* Not a data message */
#define ENOSYS 89
/* Function not implemented */
#define EOPNOTSUPP 122
/* Operation not supported on transport endpoint */
#define ETIMEDOUT 145
/* Connection timed out */
#endif
#include <sys/types.h>
#include <sys/time.h>
#ifdef RT_USING_DFS
#include <dfs_posix.h>
/* errno for Keil MDK */
#if defined(__CC_ARM) || defined(__IAR_SYSTEMS_ICC__)
#include <sys/errno.h>
#include <sys/unistd.h>
#else
typedef
rt_uint16_t
mode_t
;
#define O_RDONLY 0x0000000
#define O_WRONLY 0x0000001
#define O_RDWR 0x0000002
#define O_ACCMODE 0x0000003
#define O_CREAT 0x0000100
#define O_EXCL 0x0000200
#define O_TRUNC 0x0001000
#define O_APPEND 0x0002000
#define O_DIRECTORY 0x0200000
#endif
#elif defined (__GNUC__)
/* GNU GCC Compiler, with minilibc */
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#endif
#endif
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录