To use the Multipol runtime system, the user must decompose the program into a collection of atomic threads and explicitly manage the thread states. To simplify programming, we provide a set of macros for automatically decomposing long-lived threads into atomic threads, and for managing thread states.
The macros are written using the macro preprocessor gm4.
In this document, the term ``thread'' is used for both longed-lived theads and atomic threads, when the meaning is clear from the context.