Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
9f09e18a
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,发现更多精彩内容 >>
提交
9f09e18a
编写于
5月 03, 2012
作者:
A
Andreas Färber
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cpu: Move thread_id to CPUState
Signed-off-by:
N
Andreas Färber
<
afaerber@suse.de
>
上级
f100f0b3
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
11 addition
and
7 deletion
+11
-7
cpu-defs.h
cpu-defs.h
+0
-1
cpus.c
cpus.c
+6
-5
exec.c
exec.c
+4
-1
include/qemu/cpu.h
include/qemu/cpu.h
+1
-0
未找到文件。
cpu-defs.h
浏览文件 @
9f09e18a
...
...
@@ -201,7 +201,6 @@ typedef struct CPUWatchpoint {
int nr_cores;
/* number of cores within this CPU package */
\
int nr_threads;
/* number of threads within this CPU */
\
int running;
/* Nonzero if cpu is currently running(usermode). */
\
int thread_id; \
/* user data */
\
void *opaque; \
\
...
...
cpus.c
浏览文件 @
9f09e18a
...
...
@@ -737,7 +737,7 @@ static void *qemu_kvm_cpu_thread_fn(void *arg)
qemu_mutex_lock
(
&
qemu_global_mutex
);
qemu_thread_get_self
(
cpu
->
thread
);
env
->
thread_id
=
qemu_get_thread_id
();
cpu
->
thread_id
=
qemu_get_thread_id
();
cpu_single_env
=
env
;
r
=
kvm_init_vcpu
(
env
);
...
...
@@ -778,7 +778,7 @@ static void *qemu_dummy_cpu_thread_fn(void *arg)
qemu_mutex_lock_iothread
();
qemu_thread_get_self
(
cpu
->
thread
);
env
->
thread_id
=
qemu_get_thread_id
();
cpu
->
thread_id
=
qemu_get_thread_id
();
sigemptyset
(
&
waitset
);
sigaddset
(
&
waitset
,
SIG_IPI
);
...
...
@@ -822,7 +822,7 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
qemu_mutex_lock
(
&
qemu_global_mutex
);
for
(
env
=
first_cpu
;
env
!=
NULL
;
env
=
env
->
next_cpu
)
{
cpu
=
ENV_GET_CPU
(
env
);
env
->
thread_id
=
qemu_get_thread_id
();
cpu
->
thread_id
=
qemu_get_thread_id
();
cpu
->
created
=
true
;
}
qemu_cond_signal
(
&
qemu_cpu_cond
);
...
...
@@ -1205,7 +1205,8 @@ CpuInfoList *qmp_query_cpus(Error **errp)
CpuInfoList
*
head
=
NULL
,
*
cur_item
=
NULL
;
CPUArchState
*
env
;
for
(
env
=
first_cpu
;
env
!=
NULL
;
env
=
env
->
next_cpu
)
{
for
(
env
=
first_cpu
;
env
!=
NULL
;
env
=
env
->
next_cpu
)
{
CPUState
*
cpu
=
ENV_GET_CPU
(
env
);
CpuInfoList
*
info
;
cpu_synchronize_state
(
env
);
...
...
@@ -1215,7 +1216,7 @@ CpuInfoList *qmp_query_cpus(Error **errp)
info
->
value
->
CPU
=
env
->
cpu_index
;
info
->
value
->
current
=
(
env
==
first_cpu
);
info
->
value
->
halted
=
env
->
halted
;
info
->
value
->
thread_id
=
env
->
thread_id
;
info
->
value
->
thread_id
=
cpu
->
thread_id
;
#if defined(TARGET_I386)
info
->
value
->
has_pc
=
true
;
info
->
value
->
pc
=
env
->
eip
+
env
->
segs
[
R_CS
].
base
;
...
...
exec.c
浏览文件 @
9f09e18a
...
...
@@ -689,6 +689,9 @@ CPUArchState *qemu_get_cpu(int cpu)
void
cpu_exec_init
(
CPUArchState
*
env
)
{
#ifndef CONFIG_USER_ONLY
CPUState
*
cpu
=
ENV_GET_CPU
(
env
);
#endif
CPUArchState
**
penv
;
int
cpu_index
;
...
...
@@ -707,7 +710,7 @@ void cpu_exec_init(CPUArchState *env)
QTAILQ_INIT
(
&
env
->
breakpoints
);
QTAILQ_INIT
(
&
env
->
watchpoints
);
#ifndef CONFIG_USER_ONLY
env
->
thread_id
=
qemu_get_thread_id
();
cpu
->
thread_id
=
qemu_get_thread_id
();
#endif
*
penv
=
env
;
#if defined(CONFIG_USER_ONLY)
...
...
include/qemu/cpu.h
浏览文件 @
9f09e18a
...
...
@@ -69,6 +69,7 @@ struct CPUState {
#ifdef _WIN32
HANDLE
hThread
;
#endif
int
thread_id
;
struct
QemuCond
*
halt_cond
;
struct
qemu_work_item
*
queued_work_first
,
*
queued_work_last
;
bool
thread_kicked
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录