Hi,
I use event manager and define semaphore according to https://docs.zephyrproject.org/latest/reference/kernel/synchronization/semaphores.html.
How can i delete the semaphore at runtime and define new one?
Thanks
Hi,
I use event manager and define semaphore according to https://docs.zephyrproject.org/latest/reference/kernel/synchronization/semaphores.html.
How can i delete the semaphore at runtime and define new one?
Thanks
Hello,
I don't think there is any API to delete a semaphore. If you want to do this, you will need to add this functionality to the semaphore implementation, but if you do this, it means that you need to change some zephyr files, which means you will need to do this again every time you update the SDK, which is not ideal.
Why do you need to delete it and define a new one? Is the new one equal to the old one? If so, perhaps you can just use k_sem_reset() instead?
Best regards,
Edvin
Hello,
I don't think there is any API to delete a semaphore. If you want to do this, you will need to add this functionality to the semaphore implementation, but if you do this, it means that you need to change some zephyr files, which means you will need to do this again every time you update the SDK, which is not ideal.
Why do you need to delete it and define a new one? Is the new one equal to the old one? If so, perhaps you can just use k_sem_reset() instead?
Best regards,
Edvin