|
| From: | Gerd Hoffmann |
| Subject: | Re: [Qemu-devel] [PATCH v2] qxl: async I/O |
| Date: | Fri, 08 Jul 2011 10:10:53 +0200 |
| User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Red Hat/3.1.11-2.el6_1 Thunderbird/3.1.11 |
The above two lines change was a mistake. What about:
qxl_spice_update_area_async(...)
{
#ifdef ..
if (async) {
qxl->ssd.worker->update_area_async(...)
} else {
qxl_spice_update_area(...)
}
#else
qxl_spice_update_area(...)
#endif
}
I would do
if (async) {
#if ...
worker->foo_async()
#else
abort() /* should hot happen */
#endif
} else {
worker->foo
}
yeah, I'll throw that, malloc something, cast to cookie, pass it, cast back, free.
cookie should be big enougth to store the info directly. malloc works too though.
Doing a runtime check here is pointless, just use #if SPICE_INTERFACE_QXL_MINOR>= 1 ... #endifthis is a runtime check - what's preventing someone from compiling with 3.1 and running with 3.0? that we will require a newer library version? (which I am yet to send a patch for)
Yes, thats why the minor version of the shared library needs to be raised. cheers, Gerd
| [Prev in Thread] | Current Thread | [Next in Thread] |