Revision b7680cb6 cpus.c

b/cpus.c
531 531
    }
532 532
}
533 533

  
534
int qemu_cpu_self(void *env)
534
int qemu_cpu_is_self(void *env)
535 535
{
536 536
    return 1;
537 537
}
......
699 699
    qemu_mutex_init(&qemu_global_mutex);
700 700
    qemu_mutex_lock(&qemu_global_mutex);
701 701

  
702
    qemu_thread_self(&io_thread);
702
    qemu_thread_get_self(&io_thread);
703 703

  
704 704
    return 0;
705 705
}
......
714 714
{
715 715
    struct qemu_work_item wi;
716 716

  
717
    if (qemu_cpu_self(env)) {
717
    if (qemu_cpu_is_self(env)) {
718 718
        func(data);
719 719
        return;
720 720
    }
......
808 808
    int r;
809 809

  
810 810
    qemu_mutex_lock(&qemu_global_mutex);
811
    qemu_thread_self(env->thread);
811
    qemu_thread_get_self(env->thread);
812 812

  
813 813
    r = kvm_init_vcpu(env);
814 814
    if (r < 0) {
......
845 845
    CPUState *env = arg;
846 846

  
847 847
    qemu_tcg_init_cpu_signals();
848
    qemu_thread_self(env->thread);
848
    qemu_thread_get_self(env->thread);
849 849

  
850 850
    /* signal CPU creation */
851 851
    qemu_mutex_lock(&qemu_global_mutex);
......
888 888
    }
889 889
}
890 890

  
891
int qemu_cpu_self(void *_env)
891
int qemu_cpu_is_self(void *_env)
892 892
{
893 893
    CPUState *env = _env;
894
    QemuThread this;
895 894

  
896
    qemu_thread_self(&this);
897

  
898
    return qemu_thread_equal(&this, env->thread);
895
    return qemu_thread_is_self(env->thread);
899 896
}
900 897

  
901 898
void qemu_mutex_lock_iothread(void)
......
1023 1020

  
1024 1021
void vm_stop(int reason)
1025 1022
{
1026
    QemuThread me;
1027
    qemu_thread_self(&me);
1028

  
1029
    if (!qemu_thread_equal(&me, &io_thread)) {
1023
    if (!qemu_thread_is_self(&io_thread)) {
1030 1024
        qemu_system_vmstop_request(reason);
1031 1025
        /*
1032 1026
         * FIXME: should not return to device code in case

Also available in: Unified diff