Each thread is associated with a data structure of type OSThread declared by the user. The address of this structure is the only identifier used in thread system calls. Since the thread data structure is essentially part of the application itself, you should take care not to overwrite it inadvertently. The structure contains the thread's context (mostly, this consists of its register contents) when the thread is not running. Each thread has a priority used in scheduling and an identifier used only by the debugger. These are also maintained in the thread data structure.