static void win_stdio_close(CharDriverState *chr)

{

    WinStdioCharState *stdio = chr->opaque;



    if (stdio->hInputReadyEvent != INVALID_HANDLE_VALUE) {

        CloseHandle(stdio->hInputReadyEvent);

    }

    if (stdio->hInputDoneEvent != INVALID_HANDLE_VALUE) {

        CloseHandle(stdio->hInputDoneEvent);

    }

    if (stdio->hInputThread != INVALID_HANDLE_VALUE) {

        TerminateThread(stdio->hInputThread, 0);

    }



    g_free(chr->opaque);

    g_free(chr);

}

static void win_stdio_close(CharDriverState *chr)

{

    WinStdioCharState *stdio = chr->opaque;



    if (stdio->hInputReadyEvent != INVALID_HANDLE_VALUE) {

        CloseHandle(stdio->hInputReadyEvent);

    }

    if (stdio->hInputDoneEvent != INVALID_HANDLE_VALUE) {

        CloseHandle(stdio->hInputDoneEvent);

    }

    if (stdio->hInputThread != INVALID_HANDLE_VALUE) {

        TerminateThread(stdio->hInputThread, 0);

    }



    g_free(chr->opaque);

    g_free(chr);

}

    g_free(chr);
static void FUNC_0(CharDriverState *VAR_0)

{

    WinStdioCharState *stdio = VAR_0->opaque;



    if (stdio->hInputReadyEvent != INVALID_HANDLE_VALUE) {

        CloseHandle(stdio->hInputReadyEvent);

    }

    if (stdio->hInputDoneEvent != INVALID_HANDLE_VALUE) {

        CloseHandle(stdio->hInputDoneEvent);

    }

    if (stdio->hInputThread != INVALID_HANDLE_VALUE) {

        TerminateThread(stdio->hInputThread, 0);

    }



    g_free(VAR_0->opaque);

    g_free(VAR_0);

}

static void FUNC_0(CharDriverState *VAR_0)
{ WinStdioCharState *stdio = VAR_0->opaque; if (stdio->hInputReadyEvent != INVALID_HANDLE_VALUE) { CloseHandle(stdio->hInputReadyEvent); } if (stdio->hInputDoneEvent != INVALID_HANDLE_VALUE) { CloseHandle(stdio->hInputDoneEvent); } if (stdio->hInputThread != INVALID_HANDLE_VALUE) { TerminateThread(stdio->hInputThread, 0); } g_free(VAR_0->opaque); g_free(VAR_0); }