Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2301_76519099
rt-thread
提交
6295ec10
R
rt-thread
项目概览
2301_76519099
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
3
Star
1
Fork
1
代码
文件
提交
分支
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,发现更多精彩内容 >>
未验证
提交
6295ec10
编写于
4月 28, 2022
作者:
mysterywolf
提交者:
GitHub
4月 29, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[kernel] remove the register keyword (#5888)
上级
c28b79b7
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
34 addition
and
35 deletion
+34
-35
components/drivers/ipc/waitqueue.c
components/drivers/ipc/waitqueue.c
+1
-1
components/libc/compilers/common/time.c
components/libc/compilers/common/time.c
+6
-6
src/idle.c
src/idle.c
+3
-3
src/ipc.c
src/ipc.c
+5
-5
src/kservice.c
src/kservice.c
+4
-5
src/mempool.c
src/mempool.c
+3
-3
src/scheduler.c
src/scheduler.c
+9
-9
src/thread.c
src/thread.c
+2
-2
src/timer.c
src/timer.c
+1
-1
未找到文件。
components/drivers/ipc/waitqueue.c
浏览文件 @
6295ec10
...
...
@@ -75,7 +75,7 @@ int __wqueue_default_wake(struct rt_wqueue_node *wait, void *key)
void
rt_wqueue_wakeup
(
rt_wqueue_t
*
queue
,
void
*
key
)
{
rt_base_t
level
;
register
int
need_schedule
=
0
;
int
need_schedule
=
0
;
rt_list_t
*
queue_list
;
struct
rt_list_node
*
node
;
...
...
components/libc/compilers/common/time.c
浏览文件 @
6295ec10
/*
* Copyright (c) 2006-202
1
, RT-Thread Development Team
* Copyright (c) 2006-202
2
, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
...
...
@@ -172,7 +172,7 @@ static int set_timeval(struct timeval *tv)
struct
tm
*
gmtime_r
(
const
time_t
*
timep
,
struct
tm
*
r
)
{
time_t
i
;
register
time_t
work
=
*
timep
%
(
SPD
);
time_t
work
=
*
timep
%
(
SPD
);
r
->
tm_sec
=
work
%
60
;
work
/=
60
;
r
->
tm_min
=
work
%
60
;
...
...
@@ -181,7 +181,7 @@ struct tm *gmtime_r(const time_t *timep, struct tm *r)
r
->
tm_wday
=
(
4
+
work
)
%
7
;
for
(
i
=
1970
;;
++
i
)
{
register
time_t
k
=
__isleap
(
i
)
?
366
:
365
;
time_t
k
=
__isleap
(
i
)
?
366
:
365
;
if
(
work
>=
k
)
work
-=
k
;
else
...
...
@@ -367,9 +367,9 @@ RTM_EXPORT(stime);
time_t
timegm
(
struct
tm
*
const
t
)
{
register
time_t
day
;
register
time_t
i
;
register
time_t
years
=
(
time_t
)
t
->
tm_year
-
70
;
time_t
day
;
time_t
i
;
time_t
years
=
(
time_t
)
t
->
tm_year
-
70
;
if
(
t
->
tm_sec
>
60
)
/* seconds after the minute - [0, 60] including leap second */
{
...
...
src/idle.c
浏览文件 @
6295ec10
/*
* Copyright (c) 2006-202
1
, RT-Thread Development Team
* Copyright (c) 2006-202
2
, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
...
...
@@ -344,9 +344,9 @@ void rt_thread_idle_init(void)
rt_thread_t
rt_thread_idle_gethandler
(
void
)
{
#ifdef RT_USING_SMP
register
int
id
=
rt_hw_cpu_id
();
int
id
=
rt_hw_cpu_id
();
#else
register
int
id
=
0
;
int
id
=
0
;
#endif
/* RT_USING_SMP */
return
(
rt_thread_t
)(
&
idle
[
id
]);
...
...
src/ipc.c
浏览文件 @
6295ec10
...
...
@@ -606,7 +606,7 @@ RTM_EXPORT(rt_sem_trytake);
rt_err_t
rt_sem_release
(
rt_sem_t
sem
)
{
rt_base_t
level
;
r
egister
r
t_bool_t
need_schedule
;
rt_bool_t
need_schedule
;
/* parameter check */
RT_ASSERT
(
sem
!=
RT_NULL
);
...
...
@@ -1442,7 +1442,7 @@ rt_err_t rt_event_send(rt_event_t event, rt_uint32_t set)
struct
rt_list_node
*
n
;
struct
rt_thread
*
thread
;
rt_base_t
level
;
r
egister
r
t_base_t
status
;
rt_base_t
status
;
rt_bool_t
need_schedule
;
/* parameter check */
...
...
@@ -1570,7 +1570,7 @@ rt_err_t rt_event_recv(rt_event_t event,
{
struct
rt_thread
*
thread
;
rt_base_t
level
;
r
egister
r
t_base_t
status
;
rt_base_t
status
;
/* parameter check */
RT_ASSERT
(
event
!=
RT_NULL
);
...
...
@@ -2491,7 +2491,7 @@ rt_err_t rt_mq_init(rt_mq_t mq,
rt_uint8_t
flag
)
{
struct
rt_mq_message
*
head
;
r
egister
r
t_base_t
temp
;
rt_base_t
temp
;
/* parameter check */
RT_ASSERT
(
mq
!=
RT_NULL
);
...
...
@@ -2615,7 +2615,7 @@ rt_mq_t rt_mq_create(const char *name,
{
struct
rt_messagequeue
*
mq
;
struct
rt_mq_message
*
head
;
r
egister
r
t_base_t
temp
;
rt_base_t
temp
;
RT_ASSERT
((
flag
==
RT_IPC_FLAG_FIFO
)
||
(
flag
==
RT_IPC_FLAG_PRIO
));
...
...
src/kservice.c
浏览文件 @
6295ec10
/*
* Copyright (c) 2006-202
1
, RT-Thread Development Team
* Copyright (c) 2006-202
2
, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
...
...
@@ -495,7 +495,7 @@ RTM_EXPORT(rt_strcpy);
*/
rt_int32_t
rt_strncmp
(
const
char
*
cs
,
const
char
*
ct
,
rt_size_t
count
)
{
register
signed
char
__res
=
0
;
signed
char
__res
=
0
;
while
(
count
)
{
...
...
@@ -668,7 +668,7 @@ rt_inline int divide(long *n, int base)
rt_inline
int
skip_atoi
(
const
char
**
s
)
{
register
int
i
=
0
;
int
i
=
0
;
while
(
_ISDIGIT
(
**
s
))
i
=
i
*
10
+
*
((
*
s
)
++
)
-
'0'
;
...
...
@@ -707,8 +707,7 @@ static char *print_number(char *buf,
const
char
*
digits
;
static
const
char
small_digits
[]
=
"0123456789abcdef"
;
static
const
char
large_digits
[]
=
"0123456789ABCDEF"
;
register
int
i
;
register
int
size
;
int
i
,
size
;
size
=
s
;
...
...
src/mempool.c
浏览文件 @
6295ec10
/*
* Copyright (c) 2006-202
1
, RT-Thread Development Team
* Copyright (c) 2006-202
2
, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
...
...
@@ -93,7 +93,7 @@ rt_err_t rt_mp_init(struct rt_mempool *mp,
rt_size_t
block_size
)
{
rt_uint8_t
*
block_ptr
;
r
egister
r
t_size_t
offset
;
rt_size_t
offset
;
/* parameter check */
RT_ASSERT
(
mp
!=
RT_NULL
);
...
...
@@ -201,7 +201,7 @@ rt_mp_t rt_mp_create(const char *name,
{
rt_uint8_t
*
block_ptr
;
struct
rt_mempool
*
mp
;
r
egister
r
t_size_t
offset
;
rt_size_t
offset
;
RT_DEBUG_NOT_IN_INTERRUPT
;
...
...
src/scheduler.c
浏览文件 @
6295ec10
...
...
@@ -132,11 +132,11 @@ static void _rt_scheduler_stack_check(struct rt_thread *thread)
#ifdef RT_USING_SMP
static
struct
rt_thread
*
_scheduler_get_highest_priority_thread
(
rt_ubase_t
*
highest_prio
)
{
register
struct
rt_thread
*
highest_priority_thread
;
r
egister
r
t_ubase_t
highest_ready_priority
,
local_highest_ready_priority
;
struct
rt_thread
*
highest_priority_thread
;
rt_ubase_t
highest_ready_priority
,
local_highest_ready_priority
;
struct
rt_cpu
*
pcpu
=
rt_cpu_self
();
#if RT_THREAD_PRIORITY_MAX > 32
r
egister
r
t_ubase_t
number
;
rt_ubase_t
number
;
number
=
__rt_ffs
(
rt_thread_ready_priority_group
)
-
1
;
highest_ready_priority
=
(
number
<<
3
)
+
__rt_ffs
(
rt_thread_ready_table
[
number
])
-
1
;
...
...
@@ -168,11 +168,11 @@ static struct rt_thread* _scheduler_get_highest_priority_thread(rt_ubase_t *high
#else
static
struct
rt_thread
*
_scheduler_get_highest_priority_thread
(
rt_ubase_t
*
highest_prio
)
{
register
struct
rt_thread
*
highest_priority_thread
;
r
egister
r
t_ubase_t
highest_ready_priority
;
struct
rt_thread
*
highest_priority_thread
;
rt_ubase_t
highest_ready_priority
;
#if RT_THREAD_PRIORITY_MAX > 32
r
egister
r
t_ubase_t
number
;
rt_ubase_t
number
;
number
=
__rt_ffs
(
rt_thread_ready_priority_group
)
-
1
;
highest_ready_priority
=
(
number
<<
3
)
+
__rt_ffs
(
rt_thread_ready_table
[
number
])
-
1
;
...
...
@@ -199,7 +199,7 @@ void rt_system_scheduler_init(void)
#ifdef RT_USING_SMP
int
cpu
;
#endif
/* RT_USING_SMP */
r
egister
r
t_base_t
offset
;
rt_base_t
offset
;
#ifndef RT_USING_SMP
rt_scheduler_lock_nest
=
0
;
...
...
@@ -247,7 +247,7 @@ void rt_system_scheduler_init(void)
*/
void
rt_system_scheduler_start
(
void
)
{
register
struct
rt_thread
*
to_thread
;
struct
rt_thread
*
to_thread
;
rt_ubase_t
highest_ready_priority
;
to_thread
=
_scheduler_get_highest_priority_thread
(
&
highest_ready_priority
);
...
...
@@ -870,7 +870,7 @@ void rt_enter_critical(void)
*/
{
r
egister
r
t_uint16_t
lock_nest
=
current_thread
->
cpus_lock_nest
;
rt_uint16_t
lock_nest
=
current_thread
->
cpus_lock_nest
;
current_thread
->
cpus_lock_nest
++
;
if
(
lock_nest
==
0
)
{
...
...
src/thread.c
浏览文件 @
6295ec10
...
...
@@ -327,7 +327,7 @@ RTM_EXPORT(rt_thread_init);
rt_thread_t
rt_thread_self
(
void
)
{
#ifdef RT_USING_SMP
r
egister
r
t_base_t
lock
;
rt_base_t
lock
;
rt_thread_t
self
;
lock
=
rt_hw_local_irq_disable
();
...
...
@@ -836,7 +836,7 @@ RTM_EXPORT(rt_thread_control);
*/
rt_err_t
rt_thread_suspend
(
rt_thread_t
thread
)
{
r
egister
r
t_base_t
stat
;
rt_base_t
stat
;
rt_base_t
level
;
/* parameter check */
...
...
src/timer.c
浏览文件 @
6295ec10
...
...
@@ -409,7 +409,7 @@ rt_err_t rt_timer_start(rt_timer_t timer)
unsigned
int
row_lvl
;
rt_list_t
*
timer_list
;
rt_base_t
level
;
r
egister
r
t_bool_t
need_schedule
;
rt_bool_t
need_schedule
;
rt_list_t
*
row_head
[
RT_TIMER_SKIP_LIST_LEVEL
];
unsigned
int
tst_nr
;
static
unsigned
int
random_nr
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录