Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
c64ca814
Q
qemu
项目概览
openeuler
/
qemu
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Q
qemu
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c64ca814
编写于
5月 03, 2012
作者:
A
Andreas Färber
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cpu: Move queued_work_{first,last} to CPUState
Signed-off-by:
N
Andreas Färber
<
afaerber@suse.de
>
上级
c08d7424
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
11 addition
and
10 deletion
+11
-10
cpu-defs.h
cpu-defs.h
+0
-1
cpus.c
cpus.c
+10
-9
include/qemu/cpu.h
include/qemu/cpu.h
+1
-0
未找到文件。
cpu-defs.h
浏览文件 @
c64ca814
...
@@ -205,7 +205,6 @@ typedef struct CPUWatchpoint {
...
@@ -205,7 +205,6 @@ typedef struct CPUWatchpoint {
/* user data */
\
/* user data */
\
void *opaque; \
void *opaque; \
\
\
struct qemu_work_item *queued_work_first, *queued_work_last; \
const char *cpu_model_str; \
const char *cpu_model_str; \
struct KVMState *kvm_state; \
struct KVMState *kvm_state; \
struct kvm_run *kvm_run; \
struct kvm_run *kvm_run; \
...
...
cpus.c
浏览文件 @
c64ca814
...
@@ -66,7 +66,7 @@ static bool cpu_thread_is_idle(CPUArchState *env)
...
@@ -66,7 +66,7 @@ static bool cpu_thread_is_idle(CPUArchState *env)
{
{
CPUState
*
cpu
=
ENV_GET_CPU
(
env
);
CPUState
*
cpu
=
ENV_GET_CPU
(
env
);
if
(
cpu
->
stop
||
env
->
queued_work_first
)
{
if
(
cpu
->
stop
||
cpu
->
queued_work_first
)
{
return
false
;
return
false
;
}
}
if
(
cpu
->
stopped
||
!
runstate_is_running
())
{
if
(
cpu
->
stopped
||
!
runstate_is_running
())
{
...
@@ -652,12 +652,12 @@ void run_on_cpu(CPUArchState *env, void (*func)(void *data), void *data)
...
@@ -652,12 +652,12 @@ void run_on_cpu(CPUArchState *env, void (*func)(void *data), void *data)
wi
.
func
=
func
;
wi
.
func
=
func
;
wi
.
data
=
data
;
wi
.
data
=
data
;
if
(
!
env
->
queued_work_first
)
{
if
(
cpu
->
queued_work_first
==
NULL
)
{
env
->
queued_work_first
=
&
wi
;
cpu
->
queued_work_first
=
&
wi
;
}
else
{
}
else
{
env
->
queued_work_last
->
next
=
&
wi
;
cpu
->
queued_work_last
->
next
=
&
wi
;
}
}
env
->
queued_work_last
=
&
wi
;
cpu
->
queued_work_last
=
&
wi
;
wi
.
next
=
NULL
;
wi
.
next
=
NULL
;
wi
.
done
=
false
;
wi
.
done
=
false
;
...
@@ -672,18 +672,19 @@ void run_on_cpu(CPUArchState *env, void (*func)(void *data), void *data)
...
@@ -672,18 +672,19 @@ void run_on_cpu(CPUArchState *env, void (*func)(void *data), void *data)
static
void
flush_queued_work
(
CPUArchState
*
env
)
static
void
flush_queued_work
(
CPUArchState
*
env
)
{
{
CPUState
*
cpu
=
ENV_GET_CPU
(
env
);
struct
qemu_work_item
*
wi
;
struct
qemu_work_item
*
wi
;
if
(
!
env
->
queued_work_first
)
{
if
(
cpu
->
queued_work_first
==
NULL
)
{
return
;
return
;
}
}
while
((
wi
=
env
->
queued_work_first
))
{
while
((
wi
=
cpu
->
queued_work_first
))
{
env
->
queued_work_first
=
wi
->
next
;
cpu
->
queued_work_first
=
wi
->
next
;
wi
->
func
(
wi
->
data
);
wi
->
func
(
wi
->
data
);
wi
->
done
=
true
;
wi
->
done
=
true
;
}
}
env
->
queued_work_last
=
NULL
;
cpu
->
queued_work_last
=
NULL
;
qemu_cond_broadcast
(
&
qemu_work_cond
);
qemu_cond_broadcast
(
&
qemu_work_cond
);
}
}
...
...
include/qemu/cpu.h
浏览文件 @
c64ca814
...
@@ -70,6 +70,7 @@ struct CPUState {
...
@@ -70,6 +70,7 @@ struct CPUState {
HANDLE
hThread
;
HANDLE
hThread
;
#endif
#endif
struct
QemuCond
*
halt_cond
;
struct
QemuCond
*
halt_cond
;
struct
qemu_work_item
*
queued_work_first
,
*
queued_work_last
;
bool
thread_kicked
;
bool
thread_kicked
;
bool
created
;
bool
created
;
bool
stop
;
bool
stop
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录