...
Code Block |
---|
: OSTimeDly(10, OS_OPT_TIME_DLY, &err); : |
Referring to the µC-OS-III API Reference Manual, we know that this action indicates that µC/OS-III has to delay the current task for 10 ticks. Since this is the first task inserted in the tick list, the .TickNextPtr
and .TickPrevPtr
of the task’s OS_TCB
both point to NULL
.
OSTimeDly()
takes care of a few other details. Specifically, the task is removed from µC/OS-III’s ready list (described in The Ready List) since the task is no longer eligible to run (because it is waiting for time to expire). Also, the scheduler is called because µC/OS-III will need to run the next most important ready-to-run task.
...