mirror of
https://github.com/apache/nuttx.git
synced 2026-06-01 16:59:28 +08:00
libs/libc/semaphore: allow nxsem_init to negative value
Allow user to init semaphore value to negative value, this is needed in some use cases
This commit is contained in:
@@ -147,7 +147,7 @@ extern "C"
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int nxsem_init(FAR sem_t *sem, int pshared, uint32_t value);
|
int nxsem_init(FAR sem_t *sem, int pshared, int32_t value);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Name: nxsem_destroy
|
* Name: nxsem_destroy
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
int nxsem_init(FAR sem_t *sem, int pshared, uint32_t value)
|
int nxsem_init(FAR sem_t *sem, int pshared, int32_t value)
|
||||||
{
|
{
|
||||||
UNUSED(pshared);
|
UNUSED(pshared);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user