vTaskSuspendAll()

Hi, I need to block all tasks before calling function that I wrote. Can I use the API vTaskSuspendAll() in my application or this API is only for kernel use ? Thank you Michael

vTaskSuspendAll()

vTaskSuspendAll() is for public use. It may only be called from within a normal task (not from an ISR). xTaskResumeAll() is the opposite: it enables the scheduler. While the scheduler is suspended, ISR’s can still occur, but they will not lead to a task switch. Make sure that while the scheduler is suspended, you’re not calling any API that might need to block, such as API’s for queues or semaphores, or vTaskDelay(). Often the code between the two API’s is put in a compound statement, just for clarity:
vTaskSuspendAll();
{
    /* The scheduler is suspended here. */
}
xTaskResumeAll();

vTaskSuspendAll()

Hein Thank you very much