static void qemu_event_increment(void)

{

    /* Write 8 bytes to be compatible with eventfd.  */

    static const uint64_t val = 1;

    ssize_t ret;



    if (io_thread_fd == -1)

        return;



    do {

        ret = write(io_thread_fd, &val, sizeof(val));

    } while (ret < 0 && errno == EINTR);



    /* EAGAIN is fine, a read must be pending.  */

    if (ret < 0 && errno != EAGAIN) {

        fprintf(stderr, "qemu_event_increment: write() filed: %s\n",

                strerror(errno));

        exit (1);

    }

}

static void qemu_event_increment(void)

{

    

    static const uint64_t val = 1;

    ssize_t ret;



    if (io_thread_fd == -1)

        return;



    do {

        ret = write(io_thread_fd, &val, sizeof(val));

    } while (ret < 0 && errno == EINTR);



    

    if (ret < 0 && errno != EAGAIN) {

        fprintf(stderr, "qemu_event_increment: write() filed: %s\n",

                strerror(errno));

        exit (1);

    }

}

static void FUNC_0(void)

{

    

    static const uint64_t VAR_0 = 1;

    ssize_t ret;



    if (io_thread_fd == -1)

        return;



    do {

        ret = write(io_thread_fd, &VAR_0, sizeof(VAR_0));

    } while (ret < 0 && errno == EINTR);



    

    if (ret < 0 && errno != EAGAIN) {

        fprintf(stderr, "FUNC_0: write() filed: %s\n",

                strerror(errno));

        exit (1);

    }

}

static void FUNC_0(void)
{ static const uint64_t VAR_0 = 1; ssize_t ret; if (io_thread_fd == -1)
return; do { ret = write(io_thread_fd, &VAR_0, sizeof(VAR_0)); } while (ret < 0 && errno == EINTR); if (ret < 0 && errno != EAGAIN) { fprintf(stderr, "FUNC_0: write() filed: %s\n",
strerror(errno)); exit (1); } }