Squashed commit of the following:

Change all calls to mq_send() and mq_timedsend() in the OS to calls to nxmq_send() and nxmq_timedsend(), making appropriate changes for differences in return values.

    sched/mqueue:  Add internal function nxmq_send() and nxmq_timedsend() that are equivalent to mq_send() and mq_timedsend() except that they do not create cancellation points and do to not modify the errno variable.
This commit is contained in:
Gregory Nutt
2017-10-10 08:43:10 -06:00
parent c5a5a5a1b6
commit fca07be1df
22 changed files with 497 additions and 306 deletions
+4 -4
View File
@@ -164,7 +164,7 @@ mqd_t mq_open(FAR const char *mq_name, int oflags, ...)
/* Create a message queue descriptor for the current thread */
msgq = inode->u.i_mqueue;
mqdes = mq_descreate(NULL, msgq, oflags);
mqdes = nxmq_create_des(NULL, msgq, oflags);
if (!mqdes)
{
errcode = ENOMEM;
@@ -208,7 +208,7 @@ mqd_t mq_open(FAR const char *mq_name, int oflags, ...)
* be created with a reference count of zero.
*/
msgq = (FAR struct mqueue_inode_s *)mq_msgqalloc(mode, attr);
msgq = (FAR struct mqueue_inode_s *)nxmq_alloc_msgq(mode, attr);
if (!msgq)
{
errcode = ENOSPC;
@@ -217,7 +217,7 @@ mqd_t mq_open(FAR const char *mq_name, int oflags, ...)
/* Create a message queue descriptor for the TCB */
mqdes = mq_descreate(NULL, msgq, oflags);
mqdes = nxmq_create_des(NULL, msgq, oflags);
if (!mqdes)
{
errcode = ENOMEM;
@@ -240,7 +240,7 @@ mqd_t mq_open(FAR const char *mq_name, int oflags, ...)
return mqdes;
errout_with_msgq:
mq_msgqfree(msgq);
nxmq_free_msgq(msgq);
inode->u.i_mqueue = NULL;
errout_with_inode: