...
As previously mentioned, the code in listing 9.8 is executed to make a task ready-to-run.
(4) This is a standard procedure in µC/OS-II (see section 6.02, Making a Task Ready) except for the fact that the OS_FLAG_NODE
needs to be unlinked from the waiting list of the event flag group as well as the task’s OS_TCB
.
The unlinking of the OS_FLAG_NODE
is performed by the function OS_FlagUnlink()
as shown in listing 9.9. Figure 9.5 shows the four possible locations of an OS_FLAG_NODE
which needs to be removed from the event flag wait list. This is a classical doubly linked list removal problem except that there are also other pointers to adjust.
...