gustavonihei commented on a change in pull request #4698:
URL: https://github.com/apache/incubator-nuttx/pull/4698#discussion_r732130116
##########
File path: sched/mqueue/mq_msgqalloc.c
##########
@@ -49,50 +49,58 @@
* attr - The mq_maxmsg attribute is used at the time that the message
* queue is created to determine the maximum number of
* messages that may be placed in the message queue.
+ * msgq - This parameter is a address of a pointer
*
* Returned Value:
- * The allocated and initialized message queue structure or NULL in the
- * event of a failure.
+ * IF the function runs successfully,will return Zero(OK),else will
+ * return a error code.
+ *
+ * EINVAL attr is a null pointer and attr->mq_mqssize or attr->mq_maxmsg
+ * is an invalid value.
+ * ENOMEM No memery to alloc.
Review comment:
```suggestion
* EINVAL attr is NULL or either attr->mq_mqssize or attr->mq_maxmsg
* have an invalid value
* ENOSPC There is insufficient space for the creation of the new
message queue
```
Considering @Ouss4 comment, changing ENOMEM to ENOSPC with documentation
from OpenGroup:
https://pubs.opengroup.org/onlinepubs/009695399/functions/mq_open.html
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]