Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
不穿格子衫的农民
TencentOS Tiny
提交
514a4200
T
TencentOS Tiny
项目概览
不穿格子衫的农民
/
TencentOS Tiny
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TencentOS Tiny
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
514a4200
编写于
10月 30, 2019
作者:
C
Chen Han
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify cpu init
上级
2472c486
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
9 deletion
+8
-9
arch/linux/common/tos_cpu.c
arch/linux/common/tos_cpu.c
+1
-1
arch/linux/posix/gcc/port.c
arch/linux/posix/gcc/port.c
+6
-7
arch/linux/posix/gcc/port.h
arch/linux/posix/gcc/port.h
+1
-1
未找到文件。
arch/linux/common/tos_cpu.c
浏览文件 @
514a4200
...
...
@@ -78,6 +78,7 @@ __API__ void tos_cpu_cpsr_restore(cpu_cpsr_t cpsr)
__KERNEL__
void
cpu_init
(
void
)
{
port_init
();
k_cpu_cycle_per_tick
=
TOS_CFG_CPU_CLOCK
/
k_cpu_tick_per_second
;
cpu_systick_init
(
k_cpu_cycle_per_tick
);
...
...
@@ -108,7 +109,6 @@ __KERNEL__ void cpu_irq_context_switch(void)
__KERNEL__
void
cpu_systick_init
(
k_cycle_t
cycle_per_tick
)
{
port_systick_priority_set
(
TOS_CFG_CPU_SYSTICK_PRIO
);
port_systick_config
(
cycle_per_tick
);
}
...
...
arch/linux/posix/gcc/port.c
浏览文件 @
514a4200
...
...
@@ -133,12 +133,6 @@ __PORT__ pthread_t port_create_thread(void *arg)
__PORT__
void
port_sched_start
(
void
)
{
main_thread_id
=
pthread_self
();
pthread_mutex_init
(
&
cpsr_mutex
,
NULL
);
_install_signal
(
SIG_SUSPEND
,
_handle_suspend_thread
);
_install_signal
(
SIG_RESUME
,
_handle_resume_thread
);
_install_signal
(
SIG_CONTEXT_SWITCH
,
_handle_context_switch
);
k_curr_task
=
k_next_task
;
_resume_task
(
k_curr_task
);
...
...
@@ -193,8 +187,13 @@ __PORT__ void port_systick_config(uint32_t cycle_per_tick)
}
}
__PORT__
void
port_
systick_priority_set
(
uint32_t
prio
)
__PORT__
void
port_
init
(
void
)
{
main_thread_id
=
pthread_self
();
pthread_mutex_init
(
&
cpsr_mutex
,
NULL
);
_install_signal
(
SIG_SUSPEND
,
_handle_suspend_thread
);
_install_signal
(
SIG_RESUME
,
_handle_resume_thread
);
_install_signal
(
SIG_CONTEXT_SWITCH
,
_handle_context_switch
);
}
__PORT__
void
port_delay_ms
(
uint32_t
ms
)
...
...
arch/linux/posix/gcc/port.h
浏览文件 @
514a4200
...
...
@@ -89,7 +89,7 @@ __PORT__ void port_irq_context_switch(void);
__PORT__
void
port_systick_config
(
uint32_t
cycle_per_tick
);
__PORT__
void
port_
systick_priority_set
(
uint32_t
prio
);
//ok
__PORT__
void
port_
init
(
void
);
__PORT__
pthread_t
port_create_thread
(
void
*
arg
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录