主权项 |
1. A computer system for controlling execution of threads in a computing environment, said computer system comprising:
a memory; and a processor in communications with the memory, wherein the computer system is configured to perform a method, said method comprising:
stopping, by a thread running in a core of the processor of the computing environment, execution of another thread executing within the core of the processor, the stopping using one or more controls in one or more shared registers of the processor, the one or more shared registers being shared by the thread and the other thread, the stopping comprising:
determining, by the thread, whether the other thread is prohibiting being stopped;stopping, by the thread, instruction fetching and execution on the other thread, based on the determining indicating the other thread is not prohibiting being stopped; andchecking status of the other thread to determine whether execution of the other thread has stopped, wherein the performing the one or more operations is based on the checking indicating execution of the other thread has stopped and that the other thread did not change from not prohibiting being stopped to prohibiting being stopped after the determining and before the stopping;performing by the thread, one or more operations within the processor after the other thread was stopped from executing within the processor by the thread; andbased on completing the one or more operations, allowing, by the thread, the other thread to continue executing within the processor. |