mirror of https://gitlab.com/qemu-project/qemu
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
An upcoming patch needs to pass more than just sioc as the opaque pointer to an AioContext; but since our AioContext code in general (and its QIO Channel wrapper code) lacks a notify callback present with GSource, we do not have the trivial option of just g_malloc'ing a small struct to hold all that data coupled with a notify of g_free. Instead, the data pointer must outlive the registered handler; in fact, having the data pointer have the same lifetime as QIONetListener is adequate. But the cleanest way to stick such a helper struct in QIONetListener will be to rearrange internal struct members. And that in turn means that all existing code that currently directly accesses listener->nsioc and listener->sioc[] should instead go through accessor functions, to be immune to the upcoming struct layout changes. So this patch adds accessor methods qio_net_listener_nsioc() and qio_net_listener_sioc(), and puts them to use. While at it, notice that the pattern of grabbing an sioc from the listener only to turn around can call qio_channel_socket_get_local_address is common enough to also warrant the helper of qio_net_listener_get_local_address, and fix a copy-paste error in the corresponding documentation. Signed-off-by: Eric Blake <eblake@redhat.com> Message-ID: <20251113011625.878876-24-eblake@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> |
5 days ago | |
|---|---|---|
| .. | ||
| baum.c | 3 months ago | |
| char-console.c | 7 months ago | |
| char-fd.c | 2 months ago | |
| char-fe.c | 3 weeks ago | |
| char-file.c | 2 months ago | |
| char-hmp-cmds.c | 9 months ago | |
| char-hub.c | 3 weeks ago | |
| char-io.c | 1 year ago | |
| char-mux.c | 3 weeks ago | |
| char-null.c | 7 months ago | |
| char-parallel.c | 7 months ago | |
| char-pipe.c | 2 months ago | |
| char-pty.c | 2 months ago | |
| char-ringbuf.c | 7 months ago | |
| char-serial.c | 2 months ago | |
| char-socket.c | 5 days ago | |
| char-stdio.c | 2 months ago | |
| char-udp.c | 7 months ago | |
| char-win-stdio.c | 7 months ago | |
| char-win.c | 7 months ago | |
| char.c | 3 weeks ago | |
| chardev-internal.h | 3 weeks ago | |
| meson.build | 10 months ago | |
| msmouse.c | 7 months ago | |
| spice.c | 7 months ago | |
| testdev.c | 7 months ago | |
| trace-events | 1 year ago | |
| trace.h | 5 years ago | |
| wctablet.c | 7 months ago | |