mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/TACOS.git
synced 2025-08-02 16:51:53 +00:00
Added customizable stack sizes for TacosThreads
This commit is contained in:
parent
2eb4705ae6
commit
5cb4f3a2af
@ -31,11 +31,18 @@ namespace sta
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief Create a new thread with the given name and priority.
|
* @brief
|
||||||
*/
|
*/
|
||||||
TacosThread(const char* name, osPriority_t prio);
|
|
||||||
|
|
||||||
TacosThread();
|
/**
|
||||||
|
* @brief Create a new thread with the given name and priority.
|
||||||
|
*
|
||||||
|
* @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.
|
||||||
|
*/
|
||||||
|
TacosThread(const char* name, osPriority_t prio, uint32_t stack_size = NULL, uint32_t cb_size = NULL);
|
||||||
|
|
||||||
virtual ~TacosThread();
|
virtual ~TacosThread();
|
||||||
|
|
||||||
|
@ -19,17 +19,10 @@ namespace sta
|
|||||||
{
|
{
|
||||||
namespace tacos
|
namespace tacos
|
||||||
{
|
{
|
||||||
TacosThread::TacosThread(const char* name, osPriority_t prio)
|
TacosThread::TacosThread(const char* name, osPriority_t prio, uint32_t stack_size = NULL, uint32_t cb_size = NULL)
|
||||||
: RtosThread(RtosHandle<osThreadId_t>(Handle::Deferred(&instance_))),
|
: RtosThread(RtosHandle<osThreadId_t>(Handle::Deferred(&instance_))),
|
||||||
instance_{ NULL },
|
instance_{ NULL },
|
||||||
attribs_{ .name = name, .priority = prio },
|
attribs_{ .name = name, .priority = prio, .stack_size=stack_size, .cb_size=cb_size },
|
||||||
running_{false}
|
|
||||||
{}
|
|
||||||
|
|
||||||
TacosThread::TacosThread()
|
|
||||||
: RtosThread(RtosHandle<osThreadId_t>(Handle::Deferred(&instance_))),
|
|
||||||
instance_{ NULL },
|
|
||||||
attribs_{ },
|
|
||||||
running_{false}
|
running_{false}
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user