From: Michal Privoznik Date: Thu, 7 Jun 2018 08:17:09 +0000 (+0200) Subject: qemu_domain: Document qemuDomainObjBeginJob X-Git-Tag: v4.5.0-rc1~91 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd92df93f400d5970446aa71b461a75e25b08ffa;p=thirdparty%2Flibvirt.git qemu_domain: Document qemuDomainObjBeginJob Provide a small comment on the function and its parameters. Signed-off-by: Michal Privoznik Reviewed-by: John Ferlan --- diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 2119233907..be36a9e3e4 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -6353,8 +6353,22 @@ qemuDomainJobAllowed(qemuDomainObjPrivatePtr priv, qemuDomainJob job) /* Give up waiting for mutex after 30 seconds */ #define QEMU_JOB_WAIT_TIME (1000ull * 30) -/* - * obj must be locked before calling +/** + * qemuDomainObjBeginJobInternal: + * @driver: qemu driver + * @obj: domain object + * @job: qemuDomainJob to start + * @asyncJob: qemuDomainAsyncJob to start + * + * Acquires job for a domain object which must be locked before + * calling. If there's already a job running waits up to + * QEMU_JOB_WAIT_TIME after which the functions fails reporting + * an error. + * + * Returns: 0 on success, + * -2 if unable to start job because of timeout or + * maxQueuedJobs limit, + * -1 otherwise. */ static int ATTRIBUTE_NONNULL(1) qemuDomainObjBeginJobInternal(virQEMUDriverPtr driver,