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:
+4
-4
@@ -330,7 +330,7 @@ static int pcode_proxy(int argc, char **argv)
|
||||
fullpath = g_pcode_handoff.fullpath;
|
||||
g_pcode_handoff.fullpath = NULL;
|
||||
|
||||
sem_post(&g_pcode_handoff.exclsem);
|
||||
nxsem_post(&g_pcode_handoff.exclsem);
|
||||
DEBUGASSERT(binp && fullpath);
|
||||
|
||||
binfo("Executing %s\n", fullpath);
|
||||
@@ -477,7 +477,7 @@ static int pcode_load(struct binary_s *binp)
|
||||
berr("ERROR: Failed to duplicate the full path: %d\n",
|
||||
binp->filename);
|
||||
|
||||
sem_post(&g_pcode_handoff.exclsem);
|
||||
nxsem_post(&g_pcode_handoff.exclsem);
|
||||
ret = -ENOMEM;
|
||||
goto errout_with_fd;
|
||||
}
|
||||
@@ -510,7 +510,7 @@ static int pcode_unload(struct binary_s *binp)
|
||||
if (g_pcode_handoff.binp)
|
||||
{
|
||||
g_pcode_handoff.binp = NULL;
|
||||
sem_post(&g_pcode_handoff.exclsem);
|
||||
nxsem_post(&g_pcode_handoff.exclsem);
|
||||
}
|
||||
|
||||
return OK;
|
||||
@@ -607,7 +607,7 @@ void pcode_uninitialize(void)
|
||||
|
||||
/* Uninitialize globals */
|
||||
|
||||
sem_destroy(&g_pcode_handoff.exclsem);
|
||||
nxsem_destroy(&g_pcode_handoff.exclsem);
|
||||
}
|
||||
|
||||
#endif /* CONFIG_BINFMT_PCODE */
|
||||
|
||||
Reference in New Issue
Block a user