Thread Struct Reference

Inheritance diagram for Thread

Inheritance graph

Collaboration diagram for Thread:

Collaboration graph



Detailed Description

The CyOS threading model is based on the Threads' status. Threads are executed concurrently by priority: the higher the priority (bigger numerical value), the more time the Thread can have. No low-priority thread will be executed until there is at least one other thread with a higher priority; Threads of the same priority share more or less the same time slices for the CPU. A Thread's natural state of being is to wait. Threads spend most of the time waiting, for a timeout, a message, a file operation, a Flag or Mutex state, or many other reasons. If the OS dispatcher detects a Thread with a higher priority than PR_IDLE that does not spend much time waiting, the OS decides that it is a zombie thread (a dead thread that just eats system resources) and kills it.

See also:
Processes and Modules