Training
×

A Thread

A real-time system is separated into components that execute concurrently to perform the work of a system. These independent execution paths are called threads.
A thread is usually written as an endless loop. However, a thread can be written to execute any number of times.
Each thread has its own stack area that is used for local variables, and for calling functions and passing parameters. Each thread also has its own instruction pointer, stack pointer and values for the CPU registers - the “context” of the thread. The operating system keeps track of this information in a data area called a “thread descriptor”.