Squashed commit of the following:

sched/semaphore:  Add nxsem_post() which is identical to sem_post() except that it never modifies the errno variable.  Changed all references to sem_post in the OS to nxsem_post().

    sched/semaphore:  Add nxsem_destroy() which is identical to sem_destroy() except that it never modifies the errno variable.  Changed all references to sem_destroy() in the OS to nxsem_destroy().

    libc/semaphore and sched/semaphore:  Add nxsem_getprotocol() and nxsem_setprotocola which are identical to sem_getprotocol() and set_setprotocol() except that they never modifies the errno variable.  Changed all references to sem_setprotocol in the OS to nxsem_setprotocol().  sem_getprotocol() was not used in the OS
This commit is contained in:
Gregory Nutt
2017-10-03 15:35:24 -06:00
parent 83cdb0c552
commit 42a0796615
376 changed files with 1597 additions and 1314 deletions
+6 -6
View File
@@ -159,7 +159,7 @@ static int i2cdrvr_open(FAR struct file *filep)
priv->crefs++;
DEBUGASSERT(priv->crefs > 0);
sem_post(&priv->exclsem);
nxsem_post(&priv->exclsem);
return OK;
}
#endif
@@ -204,12 +204,12 @@ static int i2cdrvr_close(FAR struct file *filep)
if (priv->crefs <= 0 && priv->unlinked)
{
sem_destroy(&priv->exclsem);
nxsem_destroy(&priv->exclsem);
kmm_free(priv);
return OK;
}
sem_post(&priv->exclsem);
nxsem_post(&priv->exclsem);
return OK;
}
#endif
@@ -311,7 +311,7 @@ static int i2cdrvr_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
}
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
sem_post(&priv->exclsem);
nxsem_post(&priv->exclsem);
#endif
return ret;
}
@@ -345,7 +345,7 @@ static int i2cdrvr_unlink(FAR struct inode *inode)
if (priv->crefs <= 0)
{
sem_destroy(&priv->exclsem);
nxsem_destroy(&priv->exclsem);
kmm_free(priv);
return OK;
}
@@ -355,7 +355,7 @@ static int i2cdrvr_unlink(FAR struct inode *inode)
*/
priv->unlinked = true;
sem_post(&priv->exclsem);
nxsem_post(&priv->exclsem);
return ret;
}
#endif