Revision b4a3d965

b/cpus.c
312 312
void qemu_mutex_lock_iothread(void) {}
313 313
void qemu_mutex_unlock_iothread(void) {}
314 314

  
315
void cpu_stop_current(void)
316
{
317
}
318

  
315 319
void vm_stop(int reason)
316 320
{
317 321
    do_vm_stop(reason);
......
852 856
    qemu_notify_event();
853 857
}
854 858

  
859
void cpu_stop_current(void)
860
{
861
    if (cpu_single_env) {
862
        cpu_single_env->stopped = 1;
863
        cpu_exit(cpu_single_env);
864
    }
865
}
866

  
855 867
void vm_stop(int reason)
856 868
{
857 869
    QemuThread me;
......
863 875
         * FIXME: should not return to device code in case
864 876
         * vm_stop() has been requested.
865 877
         */
866
        if (cpu_single_env) {
867
            cpu_exit(cpu_single_env);
868
            cpu_single_env->stop = 1;
869
        }
878
        cpu_stop_current();
870 879
        return;
871 880
    }
872 881
    do_vm_stop(reason);
b/cpus.h
6 6
void qemu_main_loop_start(void);
7 7
void resume_all_vcpus(void);
8 8
void pause_all_vcpus(void);
9
void cpu_stop_current(void);
9 10

  
10 11
/* vl.c */
11 12
extern int smp_cores;
b/vl.c
1296 1296
    } else {
1297 1297
        reset_requested = 1;
1298 1298
    }
1299
    cpu_stop_current();
1299 1300
    qemu_notify_event();
1300 1301
}
1301 1302

  

Also available in: Unified diff