qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* hw/char: a question about watch callback function in serial
@ 2020-06-04 12:15 LIU Zhiwei
  2020-06-04 13:32 ` Peter Maydell
  0 siblings, 1 reply; 4+ messages in thread
From: LIU Zhiwei @ 2020-06-04 12:15 UTC (permalink / raw)
  To: qemu-devel@nongnu.org Developers
  Cc: peter.maydell, mst, edgar.iglesias, marcandre.lureau, pbonzini,
	Alistair Francis

[-- Attachment #1: Type: text/plain, Size: 709 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1186 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-06-08  2:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-04 12:15 hw/char: a question about watch callback function in serial LIU Zhiwei
2020-06-04 13:32 ` Peter Maydell
2020-06-05  2:19   ` LIU Zhiwei
2020-06-08  2:02     ` LIU Zhiwei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).