Updated custom stack sizes for TacosThreads

This commit is contained in:
dario 2024-01-19 13:52:39 +01:00
parent 5cb4f3a2af
commit 7f875a8f46
2 changed files with 9 additions and 6 deletions

View File

@ -39,10 +39,10 @@ namespace sta
*
* @param name The thread's name. This is used for debugging.
* @param prio The thread's priority. Generally, this should be lower than the manager and statemachine priority.
* @param stack_size The stack size for the task. The default is the stack size specified in the FreeRTOS settings.
* @param cb_size The control block size for the task. The default is the size specified in the FreeRTOS settings.
* @param stack_size The stack size for the task. The default is 0, i.e. the stack size specified in the FreeRTOS settings.
* @param cb_size The control block size for the task. The default is 0, i.e. the size specified in the FreeRTOS settings.
*/
TacosThread(const char* name, osPriority_t prio, uint32_t stack_size = NULL, uint32_t cb_size = NULL);
TacosThread(const char* name, osPriority_t prio, uint32_t stack_size = 0, uint32_t cb_size = 0);
virtual ~TacosThread();

View File

@ -19,12 +19,15 @@ namespace sta
{
namespace tacos
{
TacosThread::TacosThread(const char* name, osPriority_t prio, uint32_t stack_size = NULL, uint32_t cb_size = NULL)
TacosThread::TacosThread(const char* name, osPriority_t prio, uint32_t stack_size /* = 0 */, uint32_t cb_size /* = 0 */)
: RtosThread(RtosHandle<osThreadId_t>(Handle::Deferred(&instance_))),
instance_{ NULL },
attribs_{ .name = name, .priority = prio, .stack_size=stack_size, .cb_size=cb_size },
attribs_{ .name=name, .cb_size=cb_size, .stack_size=stack_size, .priority=prio },
running_{false}
{}
{
STA_ASSERT(stack_size >= 0);
STA_ASSERT(stack_size >= 0);
}
void TacosThread::entry_point(void* arg)
{