]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu_domain: Document qemuDomainObjBeginJob
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 7 Jun 2018 08:17:09 +0000 (10:17 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 19 Jun 2018 05:08:12 +0000 (07:08 +0200)
Provide a small comment on the function and its parameters.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/qemu/qemu_domain.c

index 21192339077aae9dfb39f2ff3cced4a9a3c6acc9..be36a9e3e4b3cc389f2836a0466944d29ee7f44f 100644 (file)
@@ -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,