Skip to content
This repository has been archived by the owner on May 19, 2022. It is now read-only.

Improve all mutex and critical section handling to be exception safe #20

Closed
jtikalsky opened this issue Nov 17, 2018 · 0 comments
Closed
Assignees

Comments

@jtikalsky
Copy link
Contributor

Now that we have #16 and #18, it is extremely important to consider that thrown exceptions will not call xSemaphoreGive(), xSemaphoreGiveRecursive(), or portEXIT_CRITICAL() as the stack unwinds, leaving the IPMC in a deadlock-immanent state.

Upgrade MutexLock to support non-immediate locks and add RecursiveMutexLock and CriticalSection to handle these cases as well. Then convert all existing uses of semaphores and critical sections to use these mechanisms so that the semaphores and critical sections are handled properly as the stack unwinds.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant