mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 07:12:54 +08:00
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:
@@ -159,7 +159,7 @@ struct mmcsd_state_s
|
||||
static void mmcsd_takesem(FAR struct mmcsd_state_s *priv);
|
||||
|
||||
#ifndef CONFIG_SDIO_MUXBUS
|
||||
# define mmcsd_givesem(p) sem_post(&priv->sem);
|
||||
# define mmcsd_givesem(p) nxsem_post(&priv->sem);
|
||||
#endif
|
||||
|
||||
/* Command/response helpers *************************************************/
|
||||
@@ -310,7 +310,7 @@ static void mmcsd_givesem(FAR struct mmcsd_state_s *priv)
|
||||
*/
|
||||
|
||||
SDIO_LOCK(priv->dev, FALSE);
|
||||
sem_post(&priv->sem);
|
||||
nxsem_post(&priv->sem);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -389,7 +389,7 @@ static void mmcsd_semgive(FAR struct mmcsd_slot_s *slot)
|
||||
{
|
||||
/* Relinquish the lock on the MMC/SD device */
|
||||
|
||||
sem_post(&slot->sem);
|
||||
nxsem_post(&slot->sem);
|
||||
|
||||
/* Relinquish the lock on the SPI bus */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user