qio: Prepare NetListener to use AioContext

For ease of review, this patch adds an AioContext pointer to the
QIONetListener struct, the code to trace it, and refactors
listener->io_source to instead be an array of utility structs; but the
aio_context pointer is always NULL until the next patch adds an API to
set it.  There should be no semantic change in this patch.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20251113011625.878876-25-eblake@redhat.com>
This commit is contained in:
Eric Blake
2025-11-13 10:54:50 -06:00
parent ec59a65a4d
commit cc0faf8273
3 changed files with 78 additions and 39 deletions
+4 -2
View File
@@ -28,6 +28,7 @@
OBJECT_DECLARE_SIMPLE_TYPE(QIONetListener,
QIO_NET_LISTENER)
typedef struct QIONetListenerSource QIONetListenerSource;
typedef void (*QIONetListenerClientFunc)(QIONetListener *listener,
QIOChannelSocket *sioc,
@@ -47,10 +48,11 @@ struct QIONetListener {
Object parent;
char *name;
QIOChannelSocket **sioc;
GSource **io_source;
QIONetListenerSource **source;
size_t nsioc;
/* At most one of context or aio_context will be set */
GMainContext *context;
AioContext *aio_context;
bool connected;