Is uxTaskGetStackHighWaterMark() preemptible?

Hello everybody, I have a low-priority task that periodically checks the other tasks’ stack usage by means of uxTaskGetStackHighWaterMark(). Is this function preemptible by the FreeRTOS scheduler? In other words, can the higher priority tasks run without having to wait for uxTaskGetStackHighWaterMark() to complete (causing a kind of priority inversion situation)? I checked the code and I didn’t see any ENTERCRITICAL … EXITCRITICAL sections, so I assume that uxTaskGetStackHighWaterMark() can be preempted by the scheduler, but I just want to make sure. Thank you Alex

Is uxTaskGetStackHighWaterMark() preemptible?

I’ve just looked at the code and cannot see any reason why the functionality is not thread safe – so yes the functions can be pre-empted by higher priority tasks but that should not cause you a problem. Regards.

Is uxTaskGetStackHighWaterMark() preemptible?

Thank you very much for your quick reply. Best Regards