Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ihbai
rt-thread
提交
678306d3
R
rt-thread
项目概览
ihbai
/
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,发现更多精彩内容 >>
提交
678306d3
编写于
3月 08, 2021
作者:
mysterywolf
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[kernel]auto formatted
上级
ce860582
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
43 addition
and
43 deletion
+43
-43
src/clock.c
src/clock.c
+2
-2
src/components.c
src/components.c
+1
-1
src/cpu.c
src/cpu.c
+1
-1
src/device.c
src/device.c
+1
-1
src/idle.c
src/idle.c
+2
-2
src/ipc.c
src/ipc.c
+10
-10
src/irq.c
src/irq.c
+3
-3
src/kservice.c
src/kservice.c
+4
-4
src/mem.c
src/mem.c
+2
-2
src/memheap.c
src/memheap.c
+3
-3
src/mempool.c
src/mempool.c
+1
-1
src/object.c
src/object.c
+5
-5
src/scheduler.c
src/scheduler.c
+4
-4
src/signal.c
src/signal.c
+1
-1
src/slab.c
src/slab.c
+1
-1
src/thread.c
src/thread.c
+1
-1
src/timer.c
src/timer.c
+1
-1
未找到文件。
src/clock.c
浏览文件 @
678306d3
/*
* Copyright (c) 2006-20
18
, RT-Thread Development Team
* Copyright (c) 2006-20
21
, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
...
...
@@ -111,7 +111,7 @@ rt_tick_t rt_tick_from_millisecond(rt_int32_t ms)
tick
=
RT_TICK_PER_SECOND
*
(
ms
/
1000
);
tick
+=
(
RT_TICK_PER_SECOND
*
(
ms
%
1000
)
+
999
)
/
1000
;
}
/* return the calculated tick */
return
tick
;
}
...
...
src/components.c
浏览文件 @
678306d3
/*
* Copyright (c) 2006-20
18
, RT-Thread Development Team
* Copyright (c) 2006-20
21
, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
...
...
src/cpu.c
浏览文件 @
678306d3
/*
* Copyright (c) 2006-20
18
, RT-Thread Development Team
* Copyright (c) 2006-20
21
, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
...
...
src/device.c
浏览文件 @
678306d3
/*
* Copyright (c) 2006-20
18
, RT-Thread Development Team
* Copyright (c) 2006-20
21
, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
...
...
src/idle.c
浏览文件 @
678306d3
/*
* Copyright (c) 2006-20
18
, RT-Thread Development Team
* Copyright (c) 2006-20
21
, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
...
...
@@ -211,7 +211,7 @@ static void rt_thread_idle_entry(void *parameter)
#endif
rt_thread_idle_excute
();
#ifdef RT_USING_PM
#ifdef RT_USING_PM
rt_system_power_manager
();
#endif
}
...
...
src/ipc.c
浏览文件 @
678306d3
/*
* Copyright (c) 2006-20
18
, RT-Thread Development Team
* Copyright (c) 2006-20
21
, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
...
...
@@ -34,7 +34,7 @@
* 2013-09-14 Grissiom add an option check in rt_event_recv
* 2018-10-02 Bernard add 64bit support for mailbox
* 2019-09-16 tyx add send wait support for message queue
* 2020-07-29 Meco Man fix thread->event_set/event_info when received an
* 2020-07-29 Meco Man fix thread->event_set/event_info when received an
* event without pending
* 2020-10-11 Meco Man add value overflow-check code
* 2021-01-03 Meco Man add rt_mb_urgent()
...
...
@@ -124,7 +124,7 @@ rt_inline rt_err_t rt_ipc_list_suspend(rt_list_t *list,
break
;
default:
break
;
break
;
}
return
RT_EOK
;
...
...
@@ -959,7 +959,7 @@ rt_err_t rt_mutex_release(rt_mutex_t mutex)
rt_hw_interrupt_enable
(
temp
);
/* enable interrupt */
return
-
RT_EFULL
;
/* value overflowed */
}
/* clear owner */
mutex
->
owner
=
RT_NULL
;
mutex
->
original_priority
=
0xff
;
...
...
@@ -1280,11 +1280,11 @@ rt_err_t rt_event_recv(rt_event_t event,
/* set received event */
if
(
recved
)
*
recved
=
(
event
->
set
&
set
);
/* fill thread event info */
/* fill thread event info */
thread
->
event_set
=
(
event
->
set
&
set
);
thread
->
event_info
=
option
;
/* received event */
if
(
option
&
RT_EVENT_FLAG_CLEAR
)
event
->
set
&=
~
set
;
...
...
@@ -1649,7 +1649,7 @@ rt_err_t rt_mb_send_wait(rt_mailbox_t mb,
++
mb
->
in_offset
;
if
(
mb
->
in_offset
>=
mb
->
size
)
mb
->
in_offset
=
0
;
if
(
mb
->
entry
<
RT_MB_ENTRY_MAX
)
{
/* increase message entry */
...
...
@@ -1660,7 +1660,7 @@ rt_err_t rt_mb_send_wait(rt_mailbox_t mb,
rt_hw_interrupt_enable
(
temp
);
/* enable interrupt */
return
-
RT_EFULL
;
/* value overflowed */
}
/* resume suspended thread */
if
(
!
rt_list_isempty
(
&
mb
->
parent
.
suspend_thread
))
{
...
...
@@ -2409,7 +2409,7 @@ rt_err_t rt_mq_urgent(rt_mq_t mq, const void *buffer, rt_size_t size)
rt_hw_interrupt_enable
(
temp
);
/* enable interrupt */
return
-
RT_EFULL
;
/* value overflowed */
}
/* resume suspended thread */
if
(
!
rt_list_isempty
(
&
mq
->
parent
.
suspend_thread
))
{
...
...
src/irq.c
浏览文件 @
678306d3
/*
* Copyright (c) 2006-20
18
, RT-Thread Development Team
* Copyright (c) 2006-20
21
, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
...
...
@@ -21,7 +21,7 @@ static void (*rt_interrupt_leave_hook)(void);
/**
* @ingroup Hook
* This function set a hook function when the system enter a interrupt
* This function set a hook function when the system enter a interrupt
*
* @note the hook function must be simple and never be blocked or suspend.
*/
...
...
@@ -31,7 +31,7 @@ void rt_interrupt_enter_sethook(void (*hook)(void))
}
/**
* @ingroup Hook
* This function set a hook function when the system exit a interrupt.
* This function set a hook function when the system exit a interrupt.
*
* @note the hook function must be simple and never be blocked or suspend.
*/
...
...
src/kservice.c
浏览文件 @
678306d3
/*
* Copyright (c) 2006-20
18
, RT-Thread Development Team
* Copyright (c) 2006-20
21
, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
...
...
@@ -456,7 +456,7 @@ RTM_EXPORT(rt_strncmp);
rt_int32_t
rt_strcmp
(
const
char
*
cs
,
const
char
*
ct
)
{
while
(
*
cs
&&
*
cs
==
*
ct
)
{
{
cs
++
;
ct
++
;
}
...
...
@@ -1127,10 +1127,10 @@ rt_device_t rt_console_set_device(const char *name)
/* find new console device */
new_device
=
rt_device_find
(
name
);
/* check whether it's a same device */
if
(
new_device
==
old_device
)
return
RT_NULL
;
if
(
new_device
!=
RT_NULL
)
{
if
(
_console_device
!=
RT_NULL
)
...
...
src/mem.c
浏览文件 @
678306d3
/*
* Copyright (c) 2006-20
18
, RT-Thread Development Team
* Copyright (c) 2006-20
21
, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
...
...
@@ -489,7 +489,7 @@ void *rt_realloc(void *rmem, rt_size_t newsize)
{
((
struct
heap_mem
*
)
&
heap_ptr
[
mem2
->
next
])
->
prev
=
ptr2
;
}
if
(
mem2
<
lfree
)
{
/* the splited struct is now the lowest */
...
...
src/memheap.c
浏览文件 @
678306d3
/*
* Copyright (c) 2006-20
18
, RT-Thread Development Team
* Copyright (c) 2006-20
21
, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*/
...
...
@@ -130,7 +130,7 @@ rt_err_t rt_memheap_detach(struct rt_memheap *heap)
RT_ASSERT
(
heap
);
RT_ASSERT
(
rt_object_get_type
(
&
heap
->
parent
)
==
RT_Object_Class_MemHeap
);
RT_ASSERT
(
rt_object_is_systemobject
(
&
heap
->
parent
));
rt_sem_detach
(
&
heap
->
lock
);
rt_object_detach
(
&
(
heap
->
parent
));
...
...
@@ -765,7 +765,7 @@ void dump_used_memheap(struct rt_memheap *mh)
rt_kprintf
(
"
\n
memory heap address:
\n
"
);
rt_kprintf
(
"heap_ptr: 0x%08x
\n
"
,
mh
->
start_addr
);
rt_kprintf
(
"free
: 0x%08x
\n
"
,
mh
->
available_size
);
rt_kprintf
(
"free
: 0x%08x
\n
"
,
mh
->
available_size
);
rt_kprintf
(
"max_used: 0x%08x
\n
"
,
mh
->
max_used_size
);
rt_kprintf
(
"size : 0x%08x
\n
"
,
mh
->
pool_size
);
...
...
src/mempool.c
浏览文件 @
678306d3
/*
* Copyright (c) 2006-20
18
, RT-Thread Development Team
* Copyright (c) 2006-20
21
, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
...
...
src/object.c
浏览文件 @
678306d3
/*
* Copyright (c) 2006-20
18
, RT-Thread Development Team
* Copyright (c) 2006-20
21
, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
...
...
@@ -200,7 +200,7 @@ void rt_object_put_sethook(void (*hook)(struct rt_object *object))
/**
* This function will return the specified type of object information.
*
* @param type the type of object, which can be
* @param type the type of object, which can be
* RT_Object_Class_Thread/Semaphore/Mutex... etc
*
* @return the object type information or RT_NULL
...
...
@@ -220,7 +220,7 @@ RTM_EXPORT(rt_object_get_information);
/**
* This function will return the length of object list in object container.
*
* @param type the type of object, which can be
* @param type the type of object, which can be
* RT_Object_Class_Thread/Semaphore/Mutex... etc
* @return the length of object list
*/
...
...
@@ -247,10 +247,10 @@ int rt_object_get_length(enum rt_object_class_type type)
RTM_EXPORT
(
rt_object_get_length
);
/**
* This function will copy the object pointer of the specified type,
* This function will copy the object pointer of the specified type,
* with the maximum size specified by maxlen.
*
* @param type the type of object, which can be
* @param type the type of object, which can be
* RT_Object_Class_Thread/Semaphore/Mutex... etc
* @param pointers the pointers will be saved to
* @param maxlen the maximum number of pointers can be saved
...
...
src/scheduler.c
浏览文件 @
678306d3
/*
* Copyright (c) 2006-20
18
, RT-Thread Development Team
* Copyright (c) 2006-20
21
, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
...
...
@@ -270,10 +270,10 @@ void rt_system_scheduler_start(void)
#ifdef RT_USING_SMP
/**
* This function will handle IPI interrupt and do a scheduling in system;
*
*
* @param vector, the number of IPI interrupt for system scheduling
* @param param, use RT_NULL
*
*
* NOTE: this function should be invoke or register as ISR in BSP.
*/
void
rt_scheduler_ipi_handler
(
int
vector
,
void
*
param
)
...
...
@@ -283,7 +283,7 @@ void rt_scheduler_ipi_handler(int vector, void *param)
/**
* This function will perform one scheduling. It will select one thread
* with the highest priority level in global ready queue or local ready queue,
* with the highest priority level in global ready queue or local ready queue,
* then switch to it.
*/
void
rt_schedule
(
void
)
...
...
src/signal.c
浏览文件 @
678306d3
/*
* Copyright (c) 2006-20
18
, RT-Thread Development Team
* Copyright (c) 2006-20
21
, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
...
...
src/slab.c
浏览文件 @
678306d3
/*
* Copyright (c) 2006-20
18
, RT-Thread Development Team
* Copyright (c) 2006-20
21
, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*/
...
...
src/thread.c
浏览文件 @
678306d3
/*
* Copyright (c) 2006-20
18
, RT-Thread Development Team
* Copyright (c) 2006-20
21
, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
...
...
src/timer.c
浏览文件 @
678306d3
/*
* Copyright (c) 2006-20
18
, RT-Thread Development Team
* Copyright (c) 2006-20
21
, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录