From e60ff3a8fdd2121aa9bce2d95b1a76562ce0e9b0 Mon Sep 17 00:00:00 2001 From: Carl Wachter Date: Tue, 4 Jun 2024 10:23:43 +0200 Subject: [PATCH] Fix: proper pshared value --- platform/hermit/pte_osal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;