Anonymous
8/20/2025, 4:18:15 PM
No.106324254
>>106324218
but anyway, it is a private member of a non-accessible class to the "user", so assuming you are sure of your own ability to cast a void pointer to its actual type, then it could also be type safe
this void pointer is also difficult to remove considering that it is directly related to the (in this case) FreeRTOS interface (void *pvParameters)
BaseType_t xTaskCreate( TaskFunction_t pvTaskCode,
const char * const pcName,
const configSTACK_DEPTH_TYPE uxStackDepth,
void *pvParameters,
UBaseType_t uxPriority,
TaskHandle_t *pxCreatedTask
);
i don't know of any way to mitigate this other than hide the entire OS interface from the user and apply the absolute minimum void pointer operations necessary to handle it internally
but anyway, it is a private member of a non-accessible class to the "user", so assuming you are sure of your own ability to cast a void pointer to its actual type, then it could also be type safe
this void pointer is also difficult to remove considering that it is directly related to the (in this case) FreeRTOS interface (void *pvParameters)
BaseType_t xTaskCreate( TaskFunction_t pvTaskCode,
const char * const pcName,
const configSTACK_DEPTH_TYPE uxStackDepth,
void *pvParameters,
UBaseType_t uxPriority,
TaskHandle_t *pxCreatedTask
);
i don't know of any way to mitigate this other than hide the entire OS interface from the user and apply the absolute minimum void pointer operations necessary to handle it internally