diff --git a/platform/hermit/pte_osal.c b/platform/hermit/pte_osal.c index 80127fe..1c7cfba 100644 --- a/platform/hermit/pte_osal.c +++ b/platform/hermit/pte_osal.c @@ -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; @@ -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;