mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 06:42:32 +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:
+2
-2
@@ -200,11 +200,11 @@ int munmap(FAR void *start, size_t length)
|
||||
curr->length = length;
|
||||
}
|
||||
|
||||
sem_post(&g_rammaps.exclsem);
|
||||
nxsem_post(&g_rammaps.exclsem);
|
||||
return OK;
|
||||
|
||||
errout_with_semaphore:
|
||||
sem_post(&g_rammaps.exclsem);
|
||||
nxsem_post(&g_rammaps.exclsem);
|
||||
set_errno(errcode);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
+1
-1
@@ -229,7 +229,7 @@ FAR void *rammap(int fd, size_t length, off_t offset)
|
||||
map->flink = g_rammaps.head;
|
||||
g_rammaps.head = map;
|
||||
|
||||
sem_post(&g_rammaps.exclsem);
|
||||
nxsem_post(&g_rammaps.exclsem);
|
||||
return map->addr;
|
||||
|
||||
errout_with_region:
|
||||
|
||||
Reference in New Issue
Block a user