struct TCB { u32_t status; struct Reg_context thread_context; void *stack; struct Thread_info thread_params; u32_t Executedtime; struct TCB *recoverytask; u32_t Sched_field; u32_t Magic_key;};
Blocking state (Blocked)
During a thread run, it may enter a blocking state for various reasons:
1> thread goes to sleep by calling the sleep method;
The 2> thread invokes an operation that is blocked on I/O, that is, the operation does not return to its caller until the input-output operation is complete;
The 3> thread attempts to get a lock that is being held by another thread;
4> thread is waiting for a trigger condition;
......
The so-called blocking state is that the running thread is not running at the end, temporarily giving up the CPU, while other in the ready state of the thread can get CPU time, into the running state.
Thread state vs. TCB, Thread life cycle