static void qemu_kvm_eat_signal(CPUState *env, int timeout)

{

    struct timespec ts;

    int r, e;

    siginfo_t siginfo;

    sigset_t waitset;



    ts.tv_sec = timeout / 1000;

    ts.tv_nsec = (timeout % 1000) * 1000000;



    sigemptyset(&waitset);

    sigaddset(&waitset, SIG_IPI);



    qemu_mutex_unlock(&qemu_global_mutex);

    r = sigtimedwait(&waitset, &siginfo, &ts);

    e = errno;

    qemu_mutex_lock(&qemu_global_mutex);



    if (r == -1 && !(e == EAGAIN || e == EINTR)) {

        fprintf(stderr, "sigtimedwait: %s\n", strerror(e));

        exit(1);

    }

}

static void qemu_kvm_eat_signal(CPUState *env, int timeout)

{

    struct timespec ts;

    int r, e;

    siginfo_t siginfo;

    sigset_t waitset;



    ts.tv_sec = timeout / 1000;

    ts.tv_nsec = (timeout % 1000) * 1000000;



    sigemptyset(&waitset);

    sigaddset(&waitset, SIG_IPI);



    qemu_mutex_unlock(&qemu_global_mutex);

    r = sigtimedwait(&waitset, &siginfo, &ts);

    e = errno;

    qemu_mutex_lock(&qemu_global_mutex);



    if (r == -1 && !(e == EAGAIN || e == EINTR)) {

        fprintf(stderr, "sigtimedwait: %s\n", strerror(e));

        exit(1);

    }

}

    qemu_mutex_unlock(&qemu_global_mutex);     r = sigtimedwait(&waitset, &siginfo, &ts);     e = errno;     qemu_mutex_lock(&qemu_global_mutex);     if (r == -1 && !(e == EAGAIN || e == EINTR)) {         fprintf(stderr, "sigtimedwait: %s\n", strerror(e));         exit(1);
static void FUNC_0(CPUState *VAR_0, int VAR_1)

{

    struct timespec VAR_2;

    int VAR_3, VAR_4;

    siginfo_t siginfo;

    sigset_t waitset;



    VAR_2.tv_sec = VAR_1 / 1000;

    VAR_2.tv_nsec = (VAR_1 % 1000) * 1000000;



    sigemptyset(&waitset);

    sigaddset(&waitset, SIG_IPI);



    qemu_mutex_unlock(&qemu_global_mutex);

    VAR_3 = sigtimedwait(&waitset, &siginfo, &VAR_2);

    VAR_4 = errno;

    qemu_mutex_lock(&qemu_global_mutex);



    if (VAR_3 == -1 && !(VAR_4 == EAGAIN || VAR_4 == EINTR)) {

        fprintf(stderr, "sigtimedwait: %s\n", strerror(VAR_4));

        exit(1);

    }

}

static void FUNC_0(CPUState *VAR_0, int VAR_1)
{ struct timespec VAR_2; int VAR_3, VAR_4; siginfo_t siginfo; sigset_t waitset; VAR_2.tv_sec = VAR_1 / 1000; VAR_2.tv_nsec = (VAR_1 % 1000) * 1000000; sigemptyset(&waitset); sigaddset(&waitset, SIG_IPI); qemu_mutex_unlock(&qemu_global_mutex); VAR_3 = sigtimedwait(&waitset, &siginfo, &VAR_2); VAR_4 = errno; qemu_mutex_lock(&qemu_global_mutex); if (VAR_3 == -1 && !(VAR_4 == EAGAIN || VAR_4 == EINTR)) { fprintf(stderr, "sigtimedwait: %s\n", strerror(VAR_4)); exit(1); } }