Hi,

> +SpiceAsyncCommand *push_spice_async_command(PCIQXLDevice *qxl,
> +    uint32_t async_io, int size)

> +/* caller must call g_free */
> +static SpiceAsyncCommand *pop_spice_async_command(PCIQXLDevice *qxl,
> +                                                  uint64_t cookie)
> +{

push/pop naming implies stack-like operation, which isn't true though.
pop will lookup by cookie.  Also an explicit release function would be
good (list unlink and g_free call can go there).

Maybe have spice_async_cmd_{alloc,lookup,free} ?

Have you considered passing down a SpiceAsyncCommand pointer instead of
the cookie value everywhere?  Seems to be a bit cleaner and more
future-proof to me.  Not sure it buys us much in practice though, so
maybe it isn't worth the trouble.

cheers,
  Gerd

Reply via email to