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:
wangchengdong
2025-08-29 10:34:19 +08:00
committed by archer
parent 0ded247f44
commit 8cfb9d7053
2 changed files with 2 additions and 2 deletions

View File

@@ -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

View File

@@ -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);