Tactility/Platforms/platform-posix/freertos/freertos_task_hooks.h
Ken Van Hoeylandt f8172446fd
App loading improvements and more (#675)
- External apps can opt into automatic cleanup when they exit, including tracked tasks, threads, files, directories, and memory.
- App-relative file paths resolve against the app’s working directory, with `.` and `..` normalized.
- The shell identifies ELF binaries that cannot be executed instead of treating them as scripts.
- Shared icon fonts now offer distinct default and large sizes, with updated icons across the interface.
- ESP32 apps can load additional ELF formats when address mirroring is enabled.
- Terminal colors render clearly on monochrome displays, and toolbar buttons have cleaner styling.
- GPS settings safely refresh their device list when their window is hidden or its widgets are destroyed.
2026-10-06 07:45:58 +02:00

31 lines
1.1 KiB
C

// SPDX-License-Identifier: Apache-2.0
#pragma once
#include "FreeRTOS.h"
#include "task.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* On the simulator, an app binary binds to xTaskCreate() and vTaskDelete() through the dynamic linker,
* so these are the simulator's own definitions, built into FreeRTOS-Kernel in place of its own.
* They call the hooks when set, passing the address they were called from.
*/
typedef BaseType_t (*FreeRtosTaskCreateHook)(const void* caller, TaskFunction_t function, const char* name, configSTACK_DEPTH_TYPE stack_depth, void* parameter, UBaseType_t priority, TaskHandle_t* out_handle);
typedef void (*FreeRtosTaskDeleteHook)(const void* caller, TaskHandle_t handle);
void freertos_set_task_hooks(FreeRtosTaskCreateHook create, FreeRtosTaskDeleteHook delete_task);
/** FreeRTOS-Kernel's own xTaskCreate() */
BaseType_t freertos_real_xTaskCreate(TaskFunction_t function, const char* name, configSTACK_DEPTH_TYPE stack_depth, void* parameter, UBaseType_t priority, TaskHandle_t* out_handle);
/** FreeRTOS-Kernel's own vTaskDelete() */
void freertos_real_vTaskDelete(TaskHandle_t handle);
#ifdef __cplusplus
}
#endif