Bugfix/workqueue crash#62
Closed
usman-pak1991 wants to merge 19 commits into
Closed
Conversation
Updates the EventGroup class to use FreeRTOS StaticEventGroup data structures internally when static allocation support is enabled.
Updates the MemoryPool class to accept a preallocated memory buffer when static allocation support is enabled.
Updates the MutexStandard & MutexRecursive classes to use FreeRTOS StaticSemaphore_t internally when static allocation support is configured.
Updates the Queue, Deque and BinaryQueue classes to use FreeRTOS StaticQueue_t internally when static allocation support is configured.
Updates the Semaphore, BinarySemaphore & CountingSemaphore classes to use FreeRTOS StaticSemaphore_t internally when static allocation support is configured.
Updates the ReadWriteLock class to use FreeRTOS StaticSemaphore_t internally when static allocation support is configured.
Updates the Timer class to use FreeRTOS StaticTimer_t when static allocation support is configured.
Updates the Thread class to use FreeRTOS xTaskCreateStatic thread creation with a preallocated static buffer when static allocation support is configured.
Updates the Tasklet class to use FreeRTOS StaticSemaphore_t internally when static allocation support is configured.
Updates the Workqueue class to use of static thread, semaphore and queue variants when static allocation support is configured.
feature/static_allocation # Teamwork Ticket - [X] [Teamwork Ticket](https://selectspace.teamwork.com/app/tasks/31944281) # Design Notes - [X] See [freertos-addons wiki page](https://github.com/Selectronic-AU/wiki/blob/master/3rd-party/FreeRTOS/freertos-addons.md) for details of approach to supporting static allocation. # Testing - [X] *TODO*: repurpose demo applications (if possible using googletest) as unit tests and port to target (STMH7). # Related PRs - [X] Refer to [PR #1](#1) for previous experimental work.
add cmake for freertos-addons
* add started guard before deletion [wip] * SW-115 port battery driver to comms * fixing tabs to spaces * fix for preventing deletion of the calling thread. and removing code smell and properly fixing the inclusion of winapi in freertos mingw port --------- Co-authored-by: Ghufran Khan <gkhan@selectronic.com.au> Co-authored-by: Ghufran Khan <153471261+gkhan-selectronic@users.noreply.github.com>
…ub.com:Selectronic-AU/freertos-addons and open bug/WorkQueue-Crash-Fix
Author
|
Minore Updates Required |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR address the issue of Hardfault due to Thread exit of WorkQueue.
Exiting the thread via break causes the task function to return, which triggers:
which tries to free the TCB while it may still be scheduled or in use
In C++, the situation is more complex than plain C:
the destructor still holds a reference to it, leading to double-free or use-after-free
Therefore, the safest approach for a C++ wrapper task is to keep the thread alive but allowing the destructor to properly clean up when the object is destroyed.