Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
RT-Thread
rt-thread
提交
c6c1544c
R
rt-thread
项目概览
RT-Thread
/
rt-thread
9 个月 前同步成功
通知
751
Star
8909
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,体验更适合开发者的 AI 搜索 >>
提交
c6c1544c
编写于
11月 14, 2021
作者:
mysterywolf
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
implement legacy support
上级
5711b0a7
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
105 addition
and
4 deletion
+105
-4
components/Kconfig
components/Kconfig
+4
-0
components/dfs/SConscript
components/dfs/SConscript
+1
-0
components/legacy/README.md
components/legacy/README.md
+2
-0
components/legacy/SConscript
components/legacy/SConscript
+22
-0
components/legacy/dfs/dfs_poll.h
components/legacy/dfs/dfs_poll.h
+1
-2
components/legacy/dfs/dfs_select.h
components/legacy/dfs/dfs_select.h
+1
-2
components/legacy/ipc/workqueue_legacy.c
components/legacy/ipc/workqueue_legacy.c
+18
-0
components/legacy/ipc/workqueue_legacy.h
components/legacy/ipc/workqueue_legacy.h
+25
-0
components/legacy/rtlegacy.h
components/legacy/rtlegacy.h
+27
-0
include/rtthread.h
include/rtthread.h
+4
-0
未找到文件。
components/Kconfig
浏览文件 @
c6c1544c
...
...
@@ -19,6 +19,10 @@ config RT_USING_USER_MAIN
default 85 if RT_THREAD_PRIORITY_256
endif
config RT_USING_LEGACY
bool "Support legacy version for compatibility"
default n
source "$RTT_DIR/components/cplusplus/Kconfig"
source "$RTT_DIR/components/finsh/Kconfig"
...
...
components/dfs/SConscript
浏览文件 @
c6c1544c
from
building
import
*
import
os
# The set of source files associated with this SConscript file.
src
=
Split
(
'''
...
...
components/legacy/README.md
0 → 100644
浏览文件 @
c6c1544c
# RT-Thread Legacy
components/legacy/SConscript
0 → 100644
浏览文件 @
c6c1544c
from
building
import
*
import
os
src
=
Split
(
'''
ipc/workqueue_legacy.c
'''
)
cwd
=
GetCurrentDir
()
CPPPATH
=
[
cwd
]
if
GetDepend
(
'RT_USING_DFS'
):
dfs_cwd
=
os
.
path
.
join
(
cwd
,
'dfs'
)
CPPPATH
+=
[
dfs_cwd
]
group
=
DefineGroup
(
'Legacy'
,
src
,
depend
=
[
'RT_USING_LEGACY'
],
CPPPATH
=
CPPPATH
)
list
=
os
.
listdir
(
cwd
)
for
item
in
list
:
if
os
.
path
.
isfile
(
os
.
path
.
join
(
cwd
,
item
,
'SConscript'
)):
group
=
group
+
SConscript
(
os
.
path
.
join
(
item
,
'SConscript'
))
Return
(
'group'
)
components/
dfs/include
/dfs_poll.h
→
components/
legacy/dfs
/dfs_poll.h
浏览文件 @
c6c1544c
...
...
@@ -5,6 +5,7 @@
*
* Change Logs:
* Date Author Notes
* 2021-11-14 Meco Man the first version
*/
#ifndef DFS_POLL_H__
...
...
@@ -12,6 +13,4 @@
#include <poll.h>
#warning "This file will be obsolete in the next version! Please use <poll.h> to instead."
#endif
/* DFS_POLL_H__ */
components/
dfs/include
/dfs_select.h
→
components/
legacy/dfs
/dfs_select.h
浏览文件 @
c6c1544c
...
...
@@ -5,6 +5,7 @@
*
* Change Logs:
* Date Author Notes
* 2021-11-14 Meco Man the first version
*/
#ifndef DFS_SELECT_H__
...
...
@@ -12,6 +13,4 @@
#include <sys/select.h>
#warning "This file will be obsolete in the next version! Please use <sys/select.h> to instead."
#endif
components/legacy/ipc/workqueue_legacy.c
0 → 100644
浏览文件 @
c6c1544c
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2021-11-14 Meco Man the first version
*/
#include "workqueue_legacy.h"
void
rt_delayed_work_init
(
struct
rt_delayed_work
*
work
,
void
(
*
work_func
)(
struct
rt_work
*
work
,
void
*
work_data
),
void
*
work_data
)
{
rt_work_init
(
&
work
->
work
,
work_func
,
work_data
);
}
components/legacy/ipc/workqueue_legacy.h
0 → 100644
浏览文件 @
c6c1544c
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2021-11-14 Meco Man the first version
*/
#ifndef __WORKQUEUE_LEGACY_H__
#define __WORKQUEUE_LEGACY_H__
#include <ipc/workqueue.h>
struct
rt_delayed_work
{
struct
rt_work
work
;
};
void
rt_delayed_work_init
(
struct
rt_delayed_work
*
work
,
void
(
*
work_func
)(
struct
rt_work
*
work
,
void
*
work_data
),
void
*
work_data
);
#endif
components/legacy/rtlegacy.h
0 → 100644
浏览文件 @
c6c1544c
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2021-11-14 Meco Man the first version
*/
#ifndef __RT_LEGACY_H__
#define __RT_LEGACY_H__
#include <rtconfig.h>
/* rtlibc */
#include <stdint.h>
#include <stddef.h>
/* IPC */
#ifdef RT_USING_DEVICE_IPC
#include "ipc/workqueue_legacy.h"
#endif
/* RT_USING_DEVICE_IPC */
/* FinSH */
#endif
/* __RT_LEGACY_H__ */
include/rtthread.h
浏览文件 @
c6c1544c
...
...
@@ -15,6 +15,7 @@
* 2016-08-09 ArdaFu add new thread and interrupt hook.
* 2018-11-22 Jesven add all cpu's lock and ipi handler
* 2021-02-28 Meco Man add RT_KSERVICE_USING_STDLIB
* 2021-11-14 Meco Man add rtlegacy.h for compatibility
*/
#ifndef __RT_THREAD_H__
...
...
@@ -25,6 +26,9 @@
#include <rtdef.h>
#include <rtservice.h>
#include <rtm.h>
#ifdef RT_USING_LEGACY
#include <rtlegacy.h>
#endif
#ifdef __cplusplus
extern
"C"
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录