Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
rt-thread
提交
1e36db0c
R
rt-thread
项目概览
BaiXuePrincess
/
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,发现更多精彩内容 >>
未验证
提交
1e36db0c
编写于
9月 28, 2021
作者:
B
Bernard Xiong
提交者:
GitHub
9月 28, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #4742 from mysterywolf/rtusingheap
[kernel] rtthread.h 增加#ifdef RT_USING_HEAP 预编译
上级
63c74199
71712054
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
21 addition
and
2 deletion
+21
-2
include/rtthread.h
include/rtthread.h
+21
-2
未找到文件。
include/rtthread.h
浏览文件 @
1e36db0c
...
...
@@ -48,9 +48,11 @@ void rt_object_init(struct rt_object *object,
enum
rt_object_class_type
type
,
const
char
*
name
);
void
rt_object_detach
(
rt_object_t
object
);
#ifdef RT_USING_HEAP
rt_object_t
rt_object_allocate
(
enum
rt_object_class_type
type
,
const
char
*
name
);
void
rt_object_delete
(
rt_object_t
object
);
#endif
rt_bool_t
rt_object_is_systemobject
(
rt_object_t
object
);
rt_uint8_t
rt_object_get_type
(
rt_object_t
object
);
rt_object_t
rt_object_find
(
const
char
*
name
,
rt_uint8_t
type
);
...
...
@@ -90,12 +92,14 @@ void rt_timer_init(rt_timer_t timer,
rt_tick_t
time
,
rt_uint8_t
flag
);
rt_err_t
rt_timer_detach
(
rt_timer_t
timer
);
#ifdef RT_USING_HEAP
rt_timer_t
rt_timer_create
(
const
char
*
name
,
void
(
*
timeout
)(
void
*
parameter
),
void
*
parameter
,
rt_tick_t
time
,
rt_uint8_t
flag
);
rt_err_t
rt_timer_delete
(
rt_timer_t
timer
);
#endif
rt_err_t
rt_timer_start
(
rt_timer_t
timer
);
rt_err_t
rt_timer_stop
(
rt_timer_t
timer
);
rt_err_t
rt_timer_control
(
rt_timer_t
timer
,
int
cmd
,
void
*
arg
);
...
...
@@ -128,17 +132,18 @@ rt_err_t rt_thread_init(struct rt_thread *thread,
rt_uint8_t
priority
,
rt_uint32_t
tick
);
rt_err_t
rt_thread_detach
(
rt_thread_t
thread
);
#ifdef RT_USING_HEAP
rt_thread_t
rt_thread_create
(
const
char
*
name
,
void
(
*
entry
)(
void
*
parameter
),
void
*
parameter
,
rt_uint32_t
stack_size
,
rt_uint8_t
priority
,
rt_uint32_t
tick
);
rt_err_t
rt_thread_delete
(
rt_thread_t
thread
);
#endif
rt_thread_t
rt_thread_self
(
void
);
rt_thread_t
rt_thread_find
(
char
*
name
);
rt_err_t
rt_thread_startup
(
rt_thread_t
thread
);
rt_err_t
rt_thread_delete
(
rt_thread_t
thread
);
rt_err_t
rt_thread_yield
(
void
);
rt_err_t
rt_thread_delay
(
rt_tick_t
tick
);
rt_err_t
rt_thread_delay_until
(
rt_tick_t
*
tick
,
rt_tick_t
inc_tick
);
...
...
@@ -228,10 +233,12 @@ rt_err_t rt_mp_init(struct rt_mempool *mp,
rt_size_t
size
,
rt_size_t
block_size
);
rt_err_t
rt_mp_detach
(
struct
rt_mempool
*
mp
);
#ifdef RT_USING_HEAP
rt_mp_t
rt_mp_create
(
const
char
*
name
,
rt_size_t
block_count
,
rt_size_t
block_size
);
rt_err_t
rt_mp_delete
(
rt_mp_t
mp
);
#endif
void
*
rt_mp_alloc
(
rt_mp_t
mp
,
rt_int32_t
time
);
void
rt_mp_free
(
void
*
block
);
...
...
@@ -303,8 +310,10 @@ rt_err_t rt_sem_init(rt_sem_t sem,
rt_uint32_t
value
,
rt_uint8_t
flag
);
rt_err_t
rt_sem_detach
(
rt_sem_t
sem
);
#ifdef RT_USING_HEAP
rt_sem_t
rt_sem_create
(
const
char
*
name
,
rt_uint32_t
value
,
rt_uint8_t
flag
);
rt_err_t
rt_sem_delete
(
rt_sem_t
sem
);
#endif
rt_err_t
rt_sem_take
(
rt_sem_t
sem
,
rt_int32_t
time
);
rt_err_t
rt_sem_trytake
(
rt_sem_t
sem
);
...
...
@@ -318,8 +327,10 @@ rt_err_t rt_sem_control(rt_sem_t sem, int cmd, void *arg);
*/
rt_err_t
rt_mutex_init
(
rt_mutex_t
mutex
,
const
char
*
name
,
rt_uint8_t
flag
);
rt_err_t
rt_mutex_detach
(
rt_mutex_t
mutex
);
#ifdef RT_USING_HEAP
rt_mutex_t
rt_mutex_create
(
const
char
*
name
,
rt_uint8_t
flag
);
rt_err_t
rt_mutex_delete
(
rt_mutex_t
mutex
);
#endif
rt_err_t
rt_mutex_take
(
rt_mutex_t
mutex
,
rt_int32_t
time
);
rt_err_t
rt_mutex_trytake
(
rt_mutex_t
mutex
);
...
...
@@ -333,8 +344,10 @@ rt_err_t rt_mutex_control(rt_mutex_t mutex, int cmd, void *arg);
*/
rt_err_t
rt_event_init
(
rt_event_t
event
,
const
char
*
name
,
rt_uint8_t
flag
);
rt_err_t
rt_event_detach
(
rt_event_t
event
);
#ifdef RT_USING_HEAP
rt_event_t
rt_event_create
(
const
char
*
name
,
rt_uint8_t
flag
);
rt_err_t
rt_event_delete
(
rt_event_t
event
);
#endif
rt_err_t
rt_event_send
(
rt_event_t
event
,
rt_uint32_t
set
);
rt_err_t
rt_event_recv
(
rt_event_t
event
,
...
...
@@ -355,8 +368,10 @@ rt_err_t rt_mb_init(rt_mailbox_t mb,
rt_size_t
size
,
rt_uint8_t
flag
);
rt_err_t
rt_mb_detach
(
rt_mailbox_t
mb
);
#ifdef RT_USING_HEAP
rt_mailbox_t
rt_mb_create
(
const
char
*
name
,
rt_size_t
size
,
rt_uint8_t
flag
);
rt_err_t
rt_mb_delete
(
rt_mailbox_t
mb
);
#endif
rt_err_t
rt_mb_send
(
rt_mailbox_t
mb
,
rt_ubase_t
value
);
rt_err_t
rt_mb_send_wait
(
rt_mailbox_t
mb
,
...
...
@@ -377,11 +392,13 @@ rt_err_t rt_mq_init(rt_mq_t mq,
rt_size_t
pool_size
,
rt_uint8_t
flag
);
rt_err_t
rt_mq_detach
(
rt_mq_t
mq
);
#ifdef RT_USING_HEAP
rt_mq_t
rt_mq_create
(
const
char
*
name
,
rt_size_t
msg_size
,
rt_size_t
max_msgs
,
rt_uint8_t
flag
);
rt_err_t
rt_mq_delete
(
rt_mq_t
mq
);
#endif
rt_err_t
rt_mq_send
(
rt_mq_t
mq
,
const
void
*
buffer
,
rt_size_t
size
);
rt_err_t
rt_mq_send_wait
(
rt_mq_t
mq
,
...
...
@@ -440,8 +457,10 @@ rt_err_t rt_device_register(rt_device_t dev,
rt_uint16_t
flags
);
rt_err_t
rt_device_unregister
(
rt_device_t
dev
);
#ifdef RT_USING_HEAP
rt_device_t
rt_device_create
(
int
type
,
int
attach_size
);
void
rt_device_destroy
(
rt_device_t
device
);
#endif
rt_err_t
rt_device_set_rx_indicate
(
rt_device_t
dev
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录