Closed leodicarpaccio closed 1 year ago
Hi,
to retrieve the running thread priority using RTOS2 API you can use the following:
osPriority_t priority = osThreadGetPriority(osThreadGetId());
CMSIS-RTOS2 API is a bit more restrictive and does not allow NULL for a thread_id in osThreadGetPriority to allow better error handling.
Hi,
Ok it make sense. Sorry for disturbance, I should have searched deeper. Regards
No worries ;)
Hello,
Unfortunately, with current implementation of osThreadGetPriority API, it's impossible to get current priority of calling task because thread_id input parameter can not be NULL. It's a shame because internal call of freeRTOS API (uxTaskPriorityGet) support this feature. Could it be corrected ?
Thanks