Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
5d1a1dc4
R
Rust
项目概览
int
/
Rust
12 个月 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5d1a1dc4
编写于
12月 06, 2011
作者:
B
Brian Anderson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
rt: Rename stk_seg.limit to stk_seg.end
rust_task is using the word limit it two ways, so one has to change.
上级
3d7b89bc
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
8 addition
and
9 deletion
+8
-9
src/rt/rust_scheduler.cpp
src/rt/rust_scheduler.cpp
+0
-1
src/rt/rust_task.cpp
src/rt/rust_task.cpp
+7
-7
src/rt/rust_task.h
src/rt/rust_task.h
+1
-1
未找到文件。
src/rt/rust_scheduler.cpp
浏览文件 @
5d1a1dc4
...
...
@@ -286,7 +286,6 @@ rust_scheduler::start_main_loop() {
scheduled_task
->
state
->
name
);
place_task_in_tls
(
scheduled_task
);
//pthread_setspecific(89, (void *)scheduled_task->stk->limit);
interrupt_flag
=
0
;
...
...
src/rt/rust_task.cpp
浏览文件 @
5d1a1dc4
...
...
@@ -51,8 +51,8 @@ new_stk(rust_scheduler *sched, rust_task *task, size_t minsz)
LOGPTR
(
task
->
sched
,
"new stk"
,
(
uintptr_t
)
stk
);
memset
(
stk
,
0
,
sizeof
(
stk_seg
));
stk
->
next
=
task
->
stk
;
stk
->
limit
=
(
uintptr_t
)
&
stk
->
data
[
minsz
+
RED_ZONE_SIZE
];
LOGPTR
(
task
->
sched
,
"stk
limit"
,
stk
->
limit
);
stk
->
end
=
(
uintptr_t
)
&
stk
->
data
[
minsz
+
RED_ZONE_SIZE
];
LOGPTR
(
task
->
sched
,
"stk
end"
,
stk
->
end
);
stk
->
valgrind_id
=
VALGRIND_STACK_REGISTER
(
&
stk
->
data
[
0
],
&
stk
->
data
[
minsz
+
RED_ZONE_SIZE
]);
...
...
@@ -106,7 +106,7 @@ rust_task::rust_task(rust_scheduler *sched, rust_task_list *state,
user
.
notify_enabled
=
0
;
stk
=
new_stk
(
sched
,
this
,
0
);
user
.
rust_sp
=
stk
->
limit
;
user
.
rust_sp
=
stk
->
end
;
if
(
supervisor
)
{
supervisor
->
ref
();
}
...
...
@@ -582,7 +582,7 @@ rust_task::new_stack(size_t stk_sz, void *args_addr, size_t args_sz) {
stk_seg
*
stk_seg
=
new_stk
(
sched
,
this
,
stk_sz
+
args_sz
);
uint8_t
*
new_sp
=
(
uint8_t
*
)
stk_seg
->
limit
;
uint8_t
*
new_sp
=
(
uint8_t
*
)
stk_seg
->
end
;
size_t
sizeof_retaddr
=
sizeof
(
void
*
);
// Make enough room on the new stack to hold the old stack pointer
// in addition to the function arguments
...
...
@@ -608,7 +608,7 @@ rust_task::record_stack_limit() {
// account for those 256 bytes.
const
unsigned
LIMIT_OFFSET
=
256
;
A
(
sched
,
(
uintptr_t
)
stk
->
limit
-
RED_ZONE_SIZE
(
uintptr_t
)
stk
->
end
-
RED_ZONE_SIZE
-
(
uintptr_t
)
stk
->
data
>=
LIMIT_OFFSET
,
"Stack size must be greater than LIMIT_OFFSET"
);
record_sp
(
stk
->
data
+
LIMIT_OFFSET
+
RED_ZONE_SIZE
);
...
...
@@ -627,9 +627,9 @@ rust_task::reset_stack_limit() {
uintptr_t
sp
=
get_sp
();
// Not positive these bounds for sp are correct.
// I think that the first possible value for esp on a new
// stack is stk->
limit
, which points one word in front of
// stack is stk->
end
, which points one word in front of
// the first work to be pushed onto a new stack.
while
(
sp
<=
(
uintptr_t
)
stk
->
data
||
stk
->
limit
<
sp
)
{
while
(
sp
<=
(
uintptr_t
)
stk
->
data
||
stk
->
end
<
sp
)
{
del_stk
(
this
,
stk
);
A
(
sched
,
stk
!=
NULL
,
"Failed to find the current stack"
);
}
...
...
src/rt/rust_task.h
浏览文件 @
5d1a1dc4
...
...
@@ -25,7 +25,7 @@ struct rust_box;
struct
stk_seg
{
stk_seg
*
next
;
uintptr_t
limit
;
uintptr_t
end
;
unsigned
int
valgrind_id
;
#ifndef _LP64
uint32_t
pad
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录