mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 23:40:19 +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:
@@ -295,7 +295,7 @@ end_wait:
|
||||
|
||||
/* Wake up the waiting thread */
|
||||
|
||||
sem_post(&pstate->png_sem);
|
||||
nxsem_post(&pstate->png_sem);
|
||||
return flags;
|
||||
}
|
||||
|
||||
@@ -366,7 +366,7 @@ int icmp_ping(in_addr_t addr, uint16_t id, uint16_t seqno, uint16_t datalen,
|
||||
*/
|
||||
|
||||
nxsem_init(&state.png_sem, 0, 0);
|
||||
sem_setprotocol(&state.png_sem, SEM_PRIO_NONE);
|
||||
nxsem_setprotocol(&state.png_sem, SEM_PRIO_NONE);
|
||||
|
||||
state.png_ticks = DSEC2TICK(dsecs); /* System ticks to wait */
|
||||
state.png_result = -ENOMEM; /* Assume allocation failure */
|
||||
|
||||
Reference in New Issue
Block a user