Check the thread pointer stored in the thread context is valid at all
points we read it from the special register, and when entering and
exiting system calls.
The later case is because the system call could be to change this value.
They are there to verify the code correctly sets this data in the thread
context.