vTaskResume() continues execution from where?

This may be obvious, but the API does not mention it and I want to confirm:
Does execution resume at the point just after the suspend call?

So, the task processes and event and suspends itself.
if (flags & logSuspendLog)
{
vTaskSuspend(logTaskHandle);
next line of code…
}

Another task calls the resume function for this task:
void logResume(void)
{
vTaskResume(logTaskHandle);
}

At that point execution for this task continues at the “next line of code” noted above. Is that correct??
ED

Yes, the task will resume exactly where it was suspended.

1 Like

Yes, you are right about this. Also, keep in mind that when that task executes will depend on priorities of other tasks in the system. Calling vTaskResume will make the task ready to run by placing it onto the ready list.

3 Likes

Excellent Thank you for the fast answers!

1 Like