I usually do not report docu-bugs, but this one bothers me:
In the example of OSSetTS() on page 353 you are changing the task's timestamp to a variable which is volatile:
timestamp = OSGetTS();
This example cannot work, because all OS_xxx() calls will lose volatile stack-variables. You must define "timestamp" as static:
static OStypeTS timestamp;
Otherwhise you could set "timestamp" to a random value.
BTW, I played a little bit with OSGetTS(), but I never got a return-value <> 0. ...