mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
Squashed commit of the following:
libc/semaphore: Add nxsem_getvalue() which is identical to sem_getvalue() except that it never modifies the errno variable. Changed all references to sem_getvalue in the OS to nxsem_getvalue().
sched/semaphore: Rename all internal private functions from sem_xyz to nxsem_xyz. The sem_ prefix is (will be) reserved only for the application semaphore interfaces.
libc/semaphore: Add nxsem_init() which is identical to sem_init() except that it never modifies the errno variable. Changed all references to sem_init in the OS to nxsem_init().
sched/semaphore: Rename sem_tickwait() to nxsem_tickwait() so that it is clear this is an internal OS function.
sched/semaphoate: Rename sem_reset() to nxsem_reset() so that it is clear this is an internal OS function.
This commit is contained in:
@@ -694,9 +694,9 @@ int ramlog_register(FAR const char *devpath, FAR char *buffer, size_t buflen)
|
||||
{
|
||||
/* Initialize the non-zero values in the RAM logging device structure */
|
||||
|
||||
sem_init(&priv->rl_exclsem, 0, 1);
|
||||
nxsem_init(&priv->rl_exclsem, 0, 1);
|
||||
#ifndef CONFIG_RAMLOG_NONBLOCKING
|
||||
sem_init(&priv->rl_waitsem, 0, 0);
|
||||
nxsem_init(&priv->rl_waitsem, 0, 0);
|
||||
|
||||
/* The rl_waitsem semaphore is used for signaling and, hence, should
|
||||
* not have priority inheritance enabled.
|
||||
|
||||
@@ -405,7 +405,7 @@ int syslog_dev_initialize(FAR const char *devpath, int oflags, int mode)
|
||||
|
||||
/* The SYSLOG device is open and ready for writing. */
|
||||
|
||||
sem_init(&g_syslog_dev.sl_sem, 0, 1);
|
||||
nxsem_init(&g_syslog_dev.sl_sem, 0, 1);
|
||||
g_syslog_dev.sl_holder = NO_HOLDER;
|
||||
g_syslog_dev.sl_state = SYSLOG_OPENED;
|
||||
return OK;
|
||||
|
||||
Reference in New Issue
Block a user