void qemu_clock_enable(QEMUClockType type, bool enabled)

{

    QEMUClock *clock = qemu_clock_ptr(type);

    QEMUTimerList *tl;

    bool old = clock->enabled;

    clock->enabled = enabled;

    if (enabled && !old) {

        qemu_clock_notify(type);

    } else if (!enabled && old) {

        QLIST_FOREACH(tl, &clock->timerlists, list) {

            qemu_event_wait(&tl->timers_done_ev);

        }

    }

}

void qemu_clock_enable(QEMUClockType type, bool enabled)

{

    QEMUClock *clock = qemu_clock_ptr(type);

    QEMUTimerList *tl;

    bool old = clock->enabled;

    clock->enabled = enabled;

    if (enabled && !old) {

        qemu_clock_notify(type);

    } else if (!enabled && old) {

        QLIST_FOREACH(tl, &clock->timerlists, list) {

            qemu_event_wait(&tl->timers_done_ev);

        }

    }

}

void FUNC_0(QEMUClockType VAR_0, bool VAR_1)

{

    QEMUClock *clock = qemu_clock_ptr(VAR_0);

    QEMUTimerList *tl;

    bool old = clock->VAR_1;

    clock->VAR_1 = VAR_1;

    if (VAR_1 && !old) {

        qemu_clock_notify(VAR_0);

    } else if (!VAR_1 && old) {

        QLIST_FOREACH(tl, &clock->timerlists, list) {

            qemu_event_wait(&tl->timers_done_ev);

        }

    }

}

void FUNC_0(QEMUClockType VAR_0, bool VAR_1)
{ QEMUClock *clock = qemu_clock_ptr(VAR_0); QEMUTimerList *tl; bool old = clock->VAR_1; clock->VAR_1 = VAR_1; if (VAR_1 && !old) { qemu_clock_notify(VAR_0); } else if (!VAR_1 && old) { QLIST_FOREACH(tl, &clock->timerlists, list) { qemu_event_wait(&tl->timers_done_ev); } } }