If task “A” is started and its task enter function is invoked, an xTaskCreate() is used to create a task “B” with a higher priority than “A.” When does the task (B) start after the creation?
-
After invoking the xTaskCreate() function, the new task (B) will start running immediately if it has a higher priority than the current task. The new task will run until it yields or is preempted by a task with an even higher priority. At that point, the current task will resume running (A). Then, xTaskCreate() will return.
-
Task “B” will be created. xTaskCreate() will return the result, and “A” will be suspended.