void qemu_spice_vm_change_state_handler(void *opaque, int running, int reason)

{

    SimpleSpiceDisplay *ssd = opaque;



    if (running) {

        ssd->worker->start(ssd->worker);

    } else {

        qemu_mutex_unlock_iothread();

        ssd->worker->stop(ssd->worker);

        qemu_mutex_lock_iothread();

    }

    ssd->running = running;

}

void qemu_spice_vm_change_state_handler(void *opaque, int running, int reason)

{

    SimpleSpiceDisplay *ssd = opaque;



    if (running) {

        ssd->worker->start(ssd->worker);

    } else {

        qemu_mutex_unlock_iothread();

        ssd->worker->stop(ssd->worker);

        qemu_mutex_lock_iothread();

    }

    ssd->running = running;

}

        qemu_mutex_unlock_iothread();         qemu_mutex_lock_iothread();         qemu_mutex_unlock_iothread();         qemu_mutex_lock_iothread();
void FUNC_0(void *VAR_0, int VAR_1, int VAR_2)

{

    SimpleSpiceDisplay *ssd = VAR_0;



    if (VAR_1) {

        ssd->worker->start(ssd->worker);

    } else {

        qemu_mutex_unlock_iothread();

        ssd->worker->stop(ssd->worker);

        qemu_mutex_lock_iothread();

    }

    ssd->VAR_1 = VAR_1;

}

void FUNC_0(void *VAR_0, int VAR_1, int VAR_2)
{ SimpleSpiceDisplay *ssd = VAR_0; if (VAR_1) { ssd->worker->start(ssd->worker); } else { qemu_mutex_unlock_iothread(); ssd->worker->stop(ssd->worker); qemu_mutex_lock_iothread(); } ssd->VAR_1 = VAR_1; }