void serial_realize_core(SerialState *s, Error **errp)

{

    if (!qemu_chr_fe_backend_connected(&s->chr)) {

        error_setg(errp, "Can't create serial device, empty char device");

        return;

    }



    s->modem_status_poll = timer_new_ns(QEMU_CLOCK_VIRTUAL, (QEMUTimerCB *) serial_update_msl, s);



    s->fifo_timeout_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, (QEMUTimerCB *) fifo_timeout_int, s);

    qemu_register_reset(serial_reset, s);



    qemu_chr_fe_set_handlers(&s->chr, serial_can_receive1, serial_receive1,

                             serial_event, NULL, s, NULL, true);

    fifo8_create(&s->recv_fifo, UART_FIFO_LENGTH);

    fifo8_create(&s->xmit_fifo, UART_FIFO_LENGTH);

    serial_reset(s);

}

void serial_realize_core(SerialState *s, Error **errp)

{

    if (!qemu_chr_fe_backend_connected(&s->chr)) {

        error_setg(errp, "Can't create serial device, empty char device");

        return;

    }



    s->modem_status_poll = timer_new_ns(QEMU_CLOCK_VIRTUAL, (QEMUTimerCB *) serial_update_msl, s);



    s->fifo_timeout_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, (QEMUTimerCB *) fifo_timeout_int, s);

    qemu_register_reset(serial_reset, s);



    qemu_chr_fe_set_handlers(&s->chr, serial_can_receive1, serial_receive1,

                             serial_event, NULL, s, NULL, true);

    fifo8_create(&s->recv_fifo, UART_FIFO_LENGTH);

    fifo8_create(&s->xmit_fifo, UART_FIFO_LENGTH);

    serial_reset(s);

}

void FUNC_0(SerialState *VAR_0, Error **VAR_1)

{

    if (!qemu_chr_fe_backend_connected(&VAR_0->chr)) {

        error_setg(VAR_1, "Can't create serial device, empty char device");

        return;

    }



    VAR_0->modem_status_poll = timer_new_ns(QEMU_CLOCK_VIRTUAL, (QEMUTimerCB *) serial_update_msl, VAR_0);



    VAR_0->fifo_timeout_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, (QEMUTimerCB *) fifo_timeout_int, VAR_0);

    qemu_register_reset(serial_reset, VAR_0);



    qemu_chr_fe_set_handlers(&VAR_0->chr, serial_can_receive1, serial_receive1,

                             serial_event, NULL, VAR_0, NULL, true);

    fifo8_create(&VAR_0->recv_fifo, UART_FIFO_LENGTH);

    fifo8_create(&VAR_0->xmit_fifo, UART_FIFO_LENGTH);

    serial_reset(VAR_0);

}

void FUNC_0(SerialState *VAR_0, Error **VAR_1)
{ if (!qemu_chr_fe_backend_connected(&VAR_0->chr)) { error_setg(VAR_1, "Can't create serial device, empty char device"); return; } VAR_0->modem_status_poll = timer_new_ns(QEMU_CLOCK_VIRTUAL, (QEMUTimerCB *) serial_update_msl, VAR_0); VAR_0->fifo_timeout_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, (QEMUTimerCB *) fifo_timeout_int, VAR_0); qemu_register_reset(serial_reset, VAR_0); qemu_chr_fe_set_handlers(&VAR_0->chr, serial_can_receive1, serial_receive1,
serial_event, NULL, VAR_0, NULL, true); fifo8_create(&VAR_0->recv_fifo, UART_FIFO_LENGTH); fifo8_create(&VAR_0->xmit_fifo, UART_FIFO_LENGTH); serial_reset(VAR_0); }