mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 06:43:53 -06:00
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
14015304b6
commit
7267c0947d
357 changed files with 1672 additions and 1674 deletions
8
cpus.c
8
cpus.c
|
@ -968,8 +968,8 @@ static void qemu_tcg_init_vcpu(void *_env)
|
|||
|
||||
/* share a single thread for all cpus with TCG */
|
||||
if (!tcg_cpu_thread) {
|
||||
env->thread = qemu_mallocz(sizeof(QemuThread));
|
||||
env->halt_cond = qemu_mallocz(sizeof(QemuCond));
|
||||
env->thread = g_malloc0(sizeof(QemuThread));
|
||||
env->halt_cond = g_malloc0(sizeof(QemuCond));
|
||||
qemu_cond_init(env->halt_cond);
|
||||
qemu_thread_create(env->thread, qemu_tcg_cpu_thread_fn, env);
|
||||
while (env->created == 0) {
|
||||
|
@ -985,8 +985,8 @@ static void qemu_tcg_init_vcpu(void *_env)
|
|||
|
||||
static void qemu_kvm_start_vcpu(CPUState *env)
|
||||
{
|
||||
env->thread = qemu_mallocz(sizeof(QemuThread));
|
||||
env->halt_cond = qemu_mallocz(sizeof(QemuCond));
|
||||
env->thread = g_malloc0(sizeof(QemuThread));
|
||||
env->halt_cond = g_malloc0(sizeof(QemuCond));
|
||||
qemu_cond_init(env->halt_cond);
|
||||
qemu_thread_create(env->thread, qemu_kvm_cpu_thread_fn, env);
|
||||
while (env->created == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue