It only deals with a single thread.
virDomainIOThreadInfoPtr **info)
{
qemuDomainObjPrivatePtr priv;
- qemuMonitorIOThreadsInfoPtr *iothreads = NULL;
+ qemuMonitorIOThreadInfoPtr *iothreads = NULL;
virDomainIOThreadInfoPtr *info_ret = NULL;
int niothreads = 0;
int hostcpus;
}
if (iothreads) {
for (i = 0; i < niothreads; i++)
- qemuMonitorIOThreadsInfoFree(iothreads[i]);
+ qemuMonitorIOThreadInfoFree(iothreads[i]);
VIR_FREE(iothreads);
}
*/
int
qemuMonitorGetIOThreads(qemuMonitorPtr mon,
- qemuMonitorIOThreadsInfoPtr **iothreads)
+ qemuMonitorIOThreadInfoPtr **iothreads)
{
VIR_DEBUG("mon=%p iothreads=%p", mon, iothreads);
return qemuMonitorJSONGetIOThreads(mon, iothreads);
}
-void qemuMonitorIOThreadsInfoFree(qemuMonitorIOThreadsInfoPtr iothread)
+void qemuMonitorIOThreadInfoFree(qemuMonitorIOThreadInfoPtr iothread)
{
if (!iothread)
return;
int qemuMonitorRTCResetReinjection(qemuMonitorPtr mon);
-typedef struct _qemuMonitorIOThreadsInfo qemuMonitorIOThreadsInfo;
-typedef qemuMonitorIOThreadsInfo *qemuMonitorIOThreadsInfoPtr;
+typedef struct _qemuMonitorIOThreadInfo qemuMonitorIOThreadInfo;
+typedef qemuMonitorIOThreadInfo *qemuMonitorIOThreadInfoPtr;
-struct _qemuMonitorIOThreadsInfo {
+struct _qemuMonitorIOThreadInfo {
char *name;
int thread_id;
};
int qemuMonitorGetIOThreads(qemuMonitorPtr mon,
- qemuMonitorIOThreadsInfoPtr **iothreads);
+ qemuMonitorIOThreadInfoPtr **iothreads);
-void qemuMonitorIOThreadsInfoFree(qemuMonitorIOThreadsInfoPtr iothread);
+void qemuMonitorIOThreadInfoFree(qemuMonitorIOThreadInfoPtr iothread);
typedef struct _qemuMonitorMemoryDeviceInfo qemuMonitorMemoryDeviceInfo;
typedef qemuMonitorMemoryDeviceInfo *qemuMonitorMemoryDeviceInfoPtr;
*/
int
qemuMonitorJSONGetIOThreads(qemuMonitorPtr mon,
- qemuMonitorIOThreadsInfoPtr **iothreads)
+ qemuMonitorIOThreadInfoPtr **iothreads)
{
int ret = -1;
virJSONValuePtr cmd;
virJSONValuePtr reply = NULL;
virJSONValuePtr data;
- qemuMonitorIOThreadsInfoPtr *infolist = NULL;
+ qemuMonitorIOThreadInfoPtr *infolist = NULL;
int n = 0;
size_t i;
for (i = 0; i < n; i++) {
virJSONValuePtr child = virJSONValueArrayGet(data, i);
const char *tmp;
- qemuMonitorIOThreadsInfoPtr info;
+ qemuMonitorIOThreadInfoPtr info;
if (VIR_ALLOC(info) < 0)
goto cleanup;
cleanup:
if (ret < 0 && infolist) {
for (i = 0; i < n; i++)
- qemuMonitorIOThreadsInfoFree(infolist[i]);
+ qemuMonitorIOThreadInfoFree(infolist[i]);
VIR_FREE(infolist);
}
virJSONValueFree(cmd);
int qemuMonitorJSONRTCResetReinjection(qemuMonitorPtr mon);
int qemuMonitorJSONGetIOThreads(qemuMonitorPtr mon,
- qemuMonitorIOThreadsInfoPtr **iothreads)
+ qemuMonitorIOThreadInfoPtr **iothreads)
ATTRIBUTE_NONNULL(2);
int qemuMonitorJSONGetMemoryDeviceInfo(qemuMonitorPtr mon,
int asyncJob)
{
qemuDomainObjPrivatePtr priv = vm->privateData;
- qemuMonitorIOThreadsInfoPtr *iothreads = NULL;
+ qemuMonitorIOThreadInfoPtr *iothreads = NULL;
int niothreads = 0;
int ret = -1;
size_t i;
cleanup:
if (iothreads) {
for (i = 0; i < niothreads; i++)
- qemuMonitorIOThreadsInfoFree(iothreads[i]);
+ qemuMonitorIOThreadInfoFree(iothreads[i]);
VIR_FREE(iothreads);
}
return ret;
{
virDomainXMLOptionPtr xmlopt = (virDomainXMLOptionPtr)data;
qemuMonitorTestPtr test = qemuMonitorTestNewSimple(true, xmlopt);
- qemuMonitorIOThreadsInfoPtr *info;
+ qemuMonitorIOThreadInfoPtr *info;
int ninfo = 0;
int ret = -1;
size_t i;
cleanup:
qemuMonitorTestFree(test);
for (i = 0; i < ninfo; i++)
- qemuMonitorIOThreadsInfoFree(info[i]);
+ qemuMonitorIOThreadInfoFree(info[i]);
VIR_FREE(info);
return ret;