You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To biggest issue with C++ thread library for embedded systems is the inability to support stack size. So we need to come up with a way to support stack size selection and still use the current API. C++ is working to add stack_hint and name to threads which will allow whatever workaround we find to be obsolete once it is in and the compilers support it. But until then, we should find a work around.
One idea, create a sort of array of structs that have a function pointer and a stack size. When thread is used it will check the list for a stack size. If none are present then it will use some default stack size. This would be our of band from the thread library. It would be im hal::freertos.
Or maybe some scoped stack hint object that changes a global (or thread local) stack size value that is then applied to the thread when it starts. Like:
{
stack_size size(1024);
std::thread my_thread(f); // stack size is 1024
} // Stack size returns to default amount.
Maybe this is fine? Some investigation is required.
The text was updated successfully, but these errors were encountered:
To biggest issue with C++ thread library for embedded systems is the inability to support stack size. So we need to come up with a way to support stack size selection and still use the current API. C++ is working to add stack_hint and name to threads which will allow whatever workaround we find to be obsolete once it is in and the compilers support it. But until then, we should find a work around.
One idea, create a sort of array of structs that have a function pointer and a stack size. When thread is used it will check the list for a stack size. If none are present then it will use some default stack size. This would be our of band from the thread library. It would be im
hal::freertos
.Or maybe some scoped stack hint object that changes a global (or thread local) stack size value that is then applied to the thread when it starts. Like:
Maybe this is fine? Some investigation is required.
The text was updated successfully, but these errors were encountered: