void qemu_cond_signal(QemuCond *cond)

{

    DWORD result;



    /*

     * Signal only when there are waiters.  cond->waiters is

     * incremented by pthread_cond_wait under the external lock,

     * so we are safe about that.

     */

    if (cond->waiters == 0) {

        return;

    }



    /*

     * Waiting threads decrement it outside the external lock, but

     * only if another thread is executing pthread_cond_broadcast and

     * has the mutex.  So, it also cannot be decremented concurrently

     * with this particular access.

     */

    cond->target = cond->waiters - 1;

    result = SignalObjectAndWait(cond->sema, cond->continue_event,

                                 INFINITE, FALSE);

    if (result == WAIT_ABANDONED || result == WAIT_FAILED) {

        error_exit(GetLastError(), __func__);

    }

}

void qemu_cond_signal(QemuCond *cond)

{

    DWORD result;



    









    if (cond->waiters == 0) {

        return;

    }



    











    cond->target = cond->waiters - 1;

    result = SignalObjectAndWait(cond->sema, cond->continue_event,

                                 INFINITE, FALSE);

    if (result == WAIT_ABANDONED || result == WAIT_FAILED) {

        error_exit(GetLastError(), __func__);

    }

}

        error_exit(GetLastError(), __func__);         error_exit(GetLastError(), __func__);         error_exit(GetLastError(), __func__);         error_exit(GetLastError(), __func__);     DWORD result;     if (cond->waiters == 0) {     cond->target = cond->waiters - 1;     result = SignalObjectAndWait(cond->sema, cond->continue_event,                                  INFINITE, FALSE);     if (result == WAIT_ABANDONED || result == WAIT_FAILED) {         error_exit(GetLastError(), __func__);     if (cond->waiters == 0) {         error_exit(GetLastError(), __func__);
void FUNC_0(QemuCond *VAR_0)

{

    DWORD result;



    









    if (VAR_0->waiters == 0) {

        return;

    }



    











    VAR_0->target = VAR_0->waiters - 1;

    result = SignalObjectAndWait(VAR_0->sema, VAR_0->continue_event,

                                 INFINITE, FALSE);

    if (result == WAIT_ABANDONED || result == WAIT_FAILED) {

        error_exit(GetLastError(), __func__);

    }

}

void FUNC_0(QemuCond *VAR_0)
{ DWORD result; if (VAR_0->waiters == 0) { return; } VAR_0->target = VAR_0->waiters - 1; result = SignalObjectAndWait(VAR_0->sema, VAR_0->continue_event,
INFINITE, FALSE); if (result == WAIT_ABANDONED || result == WAIT_FAILED) { error_exit(GetLastError(), __func__); } }