Skip to content

make freeRtos thread wrapper more dynamic #567

@kikass13

Description

@kikass13

At the moment, the wrapper implementation of modm::Thread inside the freeRtos module is useless, because the modm::rtos::Thread::Thread creates the rtos task directly inside the constructor

modm::rtos::Thread::Thread(uint32_t priority,
		uint16_t stackDepth,
		const char* name)
{
	xTaskCreate(
			&wrapper,
			name ? name : "anon",
			(stackDepth / 4) + 1,
			this,
			priority,
			&this->handle);
}

This makes no real sense to me, the constructor should be empty. Because Task can be created dynamically (will malloc anyways at the point of construction) one should be able to declare Threads without running them - and run them at a later stage in the programm (interrupt controlled for example) respectively

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions