Exemplo n.º 1
0
int qemu_cpu_self(void *_env)
{
    CPUState *env = _env;
    QemuThread this;

    qemu_thread_self(&this);

    return qemu_thread_equal(&this, env->thread);
}
Exemplo n.º 2
0
void vm_stop(int reason)
{
    QemuThread me;
    qemu_thread_self(&me);

    if (!qemu_thread_equal(&me, &io_thread)) {
        qemu_system_vmstop_request(reason);
        /*
         * FIXME: should not return to device code in case
         * vm_stop() has been requested.
         */
        if (cpu_single_env) {
            cpu_exit(cpu_single_env);
            cpu_single_env->stop = 1;
        }
        return;
    }
    do_vm_stop(reason);
}