From 749c5ef0df5ad03f87b1e7e84ee3d121461b98ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20O=2E=20Sel=C3=A5sdal?= Date: Mon, 29 Sep 2014 16:16:40 +0200 Subject: [PATCH] Correct a few comments in threadqueue --- include/ucore/threadqueue.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/ucore/threadqueue.h b/include/ucore/threadqueue.h index eacf9ab..a85932f 100644 --- a/include/ucore/threadqueue.h +++ b/include/ucore/threadqueue.h @@ -153,6 +153,7 @@ int uc_thread_queue_init(struct uc_threadqueue *queue, unsigned int max_elements * Adds a message to a queue * * thread_queue_add adds a "message" to the specified queue. + * If the queue is full, the call will block if the timeout agrument is non-NULL. * It is up to the application to manage the data and memory indicated by the * struct uc_threadmsg. * The struct uc_threadmsg is assumed to be an intrusive pointer, @@ -167,7 +168,8 @@ int uc_thread_queue_init(struct uc_threadqueue *queue, unsigned int max_elements * the front of the queue, i.e. it can be considered a "priority" message. * * @param queue Pointer to the queue on where the message should be added. - * @param timeout timeout on how long to wait on a message, or NULL for no timeout + * @param timeout timeout on how long to wait until the queue has capacity to add the message + * to the queue. * @param data the "message". * @return 0 on succes ENOMEM if out of memory EINVAL if queue is NULL, ETIMEDOUT if timeout occured or other * errno values if pthread functions failed.