A virtual multithreading hardware mechanism provides multi-threading on a
single-threaded processor. Thread switches are triggered by user-defined
triggers. Synchronous triggers may be defined in the form of special
trigger instructions. Asynchronous triggers may be defined via special
marking instructions that identify an asynchronous trigger condition. The
asynchronous trigger condition may be based on a plurality of atomic
processor events. Minimal context information, such as only an
instruction pointer address, is maintained by the hardware upon a thread
switch. In contrast to traditional simultaneous multithreading schemes,
the virtual multithreading hardware provides thread switches that are
transparent to an operating system and that may be performed without
operating system intervention.