mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +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:
+3
-3
@@ -178,7 +178,7 @@ static int audio_open(FAR struct file *filep)
|
||||
ret = OK;
|
||||
|
||||
errout_with_sem:
|
||||
sem_post(&upper->exclsem);
|
||||
nxsem_post(&upper->exclsem);
|
||||
|
||||
errout:
|
||||
return ret;
|
||||
@@ -235,7 +235,7 @@ static int audio_close(FAR struct file *filep)
|
||||
ret = OK;
|
||||
|
||||
//errout_with_sem:
|
||||
sem_post(&upper->exclsem);
|
||||
nxsem_post(&upper->exclsem);
|
||||
|
||||
errout:
|
||||
return ret;
|
||||
@@ -657,7 +657,7 @@ static int audio_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
break;
|
||||
}
|
||||
|
||||
sem_post(&upper->exclsem);
|
||||
nxsem_post(&upper->exclsem);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user