[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
hw/char: a question about watch callback function in serial
From: |
LIU Zhiwei |
Subject: |
hw/char: a question about watch callback function in serial |
Date: |
Thu, 4 Jun 2020 20:15:15 +0800 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 |
Hi folks,
I see many UART implementations have a G_IO_OUT | G_IO_HUP callback
function.
In hw/serial.c, it is serial_watch_cb, setting by the following
code,
s->watch_tag = qemu_chr_fe_add_watch(&s->chr, G_IO_OUT | G_IO_HUP,
serial_watch_cb, s);
In hw/candence_uart.c, it is cadence_uart_xmit, setting by the
following code,
guint r = qemu_chr_fe_add_watch(&s->chr, G_IO_OUT | G_IO_HUP,
cadence_uart_xmit, s);
I tried to call it with booting a Linux, but the interface will
never be called.
Can someone give a reasonable answer why needs this interface, or a
way to call it.
Best Regards,
Zhiwei
- hw/char: a question about watch callback function in serial,
LIU Zhiwei <=