panics better

This commit is contained in:
2023-11-15 12:36:23 +01:00
parent 7414756241
commit e538dd132e
2 changed files with 37 additions and 12 deletions

View File

@ -2,7 +2,7 @@
#include "semphr.h"
#include "task.h"
#define NUMBER_OF_TASKS 300
#define NUMBER_OF_TASKS 1
SemaphoreHandle_t taskMutex = NULL;
StaticSemaphore_t taskMutexDescriptor;
size_t nextFreeTaskDescriptor = 0;
@ -13,6 +13,14 @@ void initFreeRTOSHelper() {
taskMutex = xSemaphoreCreateRecursiveMutexStatic(&taskMutexDescriptor);
}
const char * getTaskName() {
return pcTaskGetName( NULL );
}
void stopIt() {
taskENTER_CRITICAL();
}
// TODO return some error code?
void *createTask(TaskFunction_t taskFunction, void *parameter, void *buffer,
size_t buffersize) {