static void qemu_kvm_init_cpu_signals(CPUState *env)

{

    int r;

    sigset_t set;

    struct sigaction sigact;



    memset(&sigact, 0, sizeof(sigact));

    sigact.sa_handler = dummy_signal;

    sigaction(SIG_IPI, &sigact, NULL);



#ifdef CONFIG_IOTHREAD

    pthread_sigmask(SIG_BLOCK, NULL, &set);

    sigdelset(&set, SIG_IPI);

    sigdelset(&set, SIGBUS);

    r = kvm_set_signal_mask(env, &set);

    if (r) {

        fprintf(stderr, "kvm_set_signal_mask: %s\n", strerror(-r));

        exit(1);

    }

#else

    sigemptyset(&set);

    sigaddset(&set, SIG_IPI);

    sigaddset(&set, SIGIO);

    sigaddset(&set, SIGALRM);

    pthread_sigmask(SIG_BLOCK, &set, NULL);



    pthread_sigmask(SIG_BLOCK, NULL, &set);

    sigdelset(&set, SIGIO);

    sigdelset(&set, SIGALRM);

#endif

    sigdelset(&set, SIG_IPI);

    sigdelset(&set, SIGBUS);

    r = kvm_set_signal_mask(env, &set);

    if (r) {

        fprintf(stderr, "kvm_set_signal_mask: %s\n", strerror(-r));

        exit(1);

    }

}

static void qemu_kvm_init_cpu_signals(CPUState *env)

{

    int r;

    sigset_t set;

    struct sigaction sigact;



    memset(&sigact, 0, sizeof(sigact));

    sigact.sa_handler = dummy_signal;

    sigaction(SIG_IPI, &sigact, NULL);



#ifdef CONFIG_IOTHREAD

    pthread_sigmask(SIG_BLOCK, NULL, &set);

    sigdelset(&set, SIG_IPI);

    sigdelset(&set, SIGBUS);

    r = kvm_set_signal_mask(env, &set);

    if (r) {

        fprintf(stderr, "kvm_set_signal_mask: %s\n", strerror(-r));

        exit(1);

    }

#else

    sigemptyset(&set);

    sigaddset(&set, SIG_IPI);

    sigaddset(&set, SIGIO);

    sigaddset(&set, SIGALRM);

    pthread_sigmask(SIG_BLOCK, &set, NULL);



    pthread_sigmask(SIG_BLOCK, NULL, &set);

    sigdelset(&set, SIGIO);

    sigdelset(&set, SIGALRM);

#endif

    sigdelset(&set, SIG_IPI);

    sigdelset(&set, SIGBUS);

    r = kvm_set_signal_mask(env, &set);

    if (r) {

        fprintf(stderr, "kvm_set_signal_mask: %s\n", strerror(-r));

        exit(1);

    }

}

#ifdef CONFIG_IOTHREAD #endif #ifdef CONFIG_IOTHREAD #endif #endif #ifdef CONFIG_IOTHREAD #else     sigemptyset(&set); #endif #ifdef CONFIG_IOTHREAD #else     sigemptyset(&set);     sigaddset(&set, SIG_IPI);     sigaddset(&set, SIGIO);     sigaddset(&set, SIGALRM);     pthread_sigmask(SIG_BLOCK, &set, NULL);     pthread_sigmask(SIG_BLOCK, NULL, &set);     sigdelset(&set, SIGIO);     sigdelset(&set, SIGALRM); #endif #ifdef CONFIG_IOTHREAD #endif     int r; #else #endif #endif #endif #ifdef CONFIG_IOTHREAD #else #endif #endif #ifdef CONFIG_IOTHREAD #endif #endif #endif #ifdef CONFIG_IOTHREAD #else #endif
static void FUNC_0(CPUState *VAR_0)

{

    int VAR_1;

    sigset_t set;

    struct sigaction VAR_2;



    memset(&VAR_2, 0, sizeof(VAR_2));

    VAR_2.sa_handler = dummy_signal;

    sigaction(SIG_IPI, &VAR_2, NULL);



#ifdef CONFIG_IOTHREAD

    pthread_sigmask(SIG_BLOCK, NULL, &set);

    sigdelset(&set, SIG_IPI);

    sigdelset(&set, SIGBUS);

    VAR_1 = kvm_set_signal_mask(VAR_0, &set);

    if (VAR_1) {

        fprintf(stderr, "kvm_set_signal_mask: %s\n", strerror(-VAR_1));

        exit(1);

    }

#else

    sigemptyset(&set);

    sigaddset(&set, SIG_IPI);

    sigaddset(&set, SIGIO);

    sigaddset(&set, SIGALRM);

    pthread_sigmask(SIG_BLOCK, &set, NULL);



    pthread_sigmask(SIG_BLOCK, NULL, &set);

    sigdelset(&set, SIGIO);

    sigdelset(&set, SIGALRM);

#endif

    sigdelset(&set, SIG_IPI);

    sigdelset(&set, SIGBUS);

    VAR_1 = kvm_set_signal_mask(VAR_0, &set);

    if (VAR_1) {

        fprintf(stderr, "kvm_set_signal_mask: %s\n", strerror(-VAR_1));

        exit(1);

    }

}

static void FUNC_0(CPUState *VAR_0)
{ int VAR_1; sigset_t set; struct sigaction VAR_2; memset(&VAR_2, 0, sizeof(VAR_2)); VAR_2.sa_handler = dummy_signal; sigaction(SIG_IPI, &VAR_2, NULL); #ifdef CONFIG_IOTHREAD
pthread_sigmask(SIG_BLOCK, NULL, &set); sigdelset(&set, SIG_IPI); sigdelset(&set, SIGBUS); VAR_1 = kvm_set_signal_mask(VAR_0, &set); if (VAR_1) { fprintf(stderr, "kvm_set_signal_mask: %s\n", strerror(-VAR_1)); exit(1); } #else
sigemptyset(&set); sigaddset(&set, SIG_IPI); sigaddset(&set, SIGIO); sigaddset(&set, SIGALRM); pthread_sigmask(SIG_BLOCK, &set, NULL); pthread_sigmask(SIG_BLOCK, NULL, &set); sigdelset(&set, SIGIO); sigdelset(&set, SIGALRM); #endif
sigdelset(&set, SIG_IPI); sigdelset(&set, SIGBUS); VAR_1 = kvm_set_signal_mask(VAR_0, &set); if (VAR_1) { fprintf(stderr, "kvm_set_signal_mask: %s\n", strerror(-VAR_1)); exit(1); } }