摘要 |
A multi-threaded processor adapted to perform ordered execution, wherein the execution of threads, or code portions, is delayed if, and only if, execution of a thread would violate the ordered execution of a program. The processor initializes a Global Start Register and a Global Finish Register; saves an initial value of the Global Start Register and then increments the Global Start Register upon execution of each code portion requiring ordered execution; increments the Global Finish Register upon completion of execution of the code portion; and, compares the initial value of the Global Start Register with the present value of the Global Finish Register. If the initial value of the Global Start Register is equal to the present value of the Global Finish Register, indicating that no out-of-order execution of code portions has occurred, the processor increments the Global Finish Register; or, if the initial value of the Global Start Register is not equal to the present value of the Global Finish Register, indicating out-of-order execution, it waits for a specified event and then again compares the initial value of the Global Start Register with the present value of the Global Finish Register, repeating until they are equal. |