1)"Spawning and Resynchronizing". Should chThdShouldTerminateX() must be used instead of chThdTerminatedX()
2) "Processing Frames"
Code: Select all
/* If the network is down all the waiting threads are notified.*/
if ((NET->SR & NET_SR_ERROR) != 0 {
/* Entering I-Locked state and waking up all threads with a
special message.*/
chSysLockFromISR();
chThdDequeueNextI(&rx_frames_queue, MSG_RESET);
chSysUnlockFromISR();
/* Resetting interrupt source.*/
NET->SR &= ~NET_SR_ERROR;
}
may be chThdDequeueAllI()?
3) "Priority Ceiling". Example should be closer to real usage. I feel that the solution is an elegant, but can not think of a use case for it.
4) "Time Bounded Loop".
Code: Select all
systime_t start = chVTGetSystemTime();
systime_t end = now + MS2ST(200);
should "now" variable be replace by "start"?
5) Passing of arguments (void *arg) to thread functions and VT callbacks should be described a bit more.
6) Examples are good from my point of view but we need some feedback from newcomers.
Offtopic:
Now I am understand destination of chThdYield() function.