Patent ID: 7770169

Claim:
A method, comprising: inserting an instance of read-from-memory instruction at each of a plurality of safe points in one or more code portions executed by a plurality of threads, the instruction being configured so that when executed by a processor, the instruction causes the processor to read a page protected memory address, said page protected memory address being set to be unprotected against a read; receiving a request for thread rendezvous; in response to the thread rendezvous request, modifying the page protected memory address to become protected against a read, wherein when each of the read-from-memory instructions attempts to read the page protected memory address in said plurality of threads a trap handler is invoked that results in the execution of each of said plurality of threads being suspended at a respective safe point; determining whether or not execution of all of said plurality of threads has been suspended, and, if so, modifying the page protected memory address to become unprotected against a read; and otherwise, continuing to suspend execution of the threads.