Correct a few comments in threadqueue

This commit is contained in:
Nils O. Selåsdal
2014-09-29 16:16:40 +02:00
parent 13e611c79d
commit 749c5ef0df
+3 -1
View File
@@ -153,6 +153,7 @@ int uc_thread_queue_init(struct uc_threadqueue *queue, unsigned int max_elements
* Adds a message to a queue * Adds a message to a queue
* *
* thread_queue_add adds a "message" to the specified 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 * It is up to the application to manage the data and memory indicated by the
* struct uc_threadmsg. * struct uc_threadmsg.
* The struct uc_threadmsg is assumed to be an intrusive pointer, * 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. * 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 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". * @param data the "message".
* @return 0 on succes ENOMEM if out of memory EINVAL if queue is NULL, ETIMEDOUT if timeout occured or other * @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. * errno values if pthread functions failed.