Skip to content

Commit

Permalink
Fix: proper pshared value
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlWachter committed Jun 4, 2024
1 parent ca70a6f commit e60ff3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions platform/hermit/pte_osal.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ int pte_osThreadGetDefaultPriority(void)

pte_osResult pte_osMutexCreate(pte_osMutexHandle *pHandle)
{
if (sys_sem_init(pHandle, 1, 1))
if (sys_sem_init(pHandle, 0, 1))
return PTE_OS_NO_RESOURCES;

return PTE_OS_OK;
Expand Down Expand Up @@ -442,7 +442,7 @@ pte_osResult pte_osMutexUnlock(pte_osMutexHandle handle)

pte_osResult pte_osSemaphoreCreate(int initialValue, pte_osSemaphoreHandle *pHandle)
{
if (sys_sem_init(pHandle, 1, initialValue))
if (sys_sem_init(pHandle, 0, initialValue))
return PTE_OS_NO_RESOURCES;

return PTE_OS_OK;
Expand Down

0 comments on commit e60ff3a

Please sign in to comment.