Chapter 6 Multithreaded Environment Conventions
This chapter defines the conventions to support the execution of multiple threads in the multilanguage Windows NT for Alpha Systems environment. Specifically, it defines how compiled code must perform stack limit checking. While this calling standard is compatible with a multithreaded execution environment, the detailed mechanisms, data structures, and procedures that support this capability are not specified here.
For a multithreaded environment, the following characteristics are assumed:
- There can be one or more threads executing within a single process.
- The state of a thread is represented in a thread environment block (TEB).
- The TEB of a thread contains information that determines a stack limit, below which the stack pointer must not be decremented by the executing code (except for code that implements the multithread mechanism itself).
- Exception handling is fully reentrant and multithreaded.
- The correct way to terminate a thread is by returning from the initial procedure in which the thread began execution, or by a call to RtlUnwind specifying a null target environment or some other procedure that includes this effect. That is, correct thread termination involves unwind processing for all of the active frames of that thread.