Patent ID: 8407455

Claim:
An article of manufacture comprising a non-transitory computer-readable storage medium having program instructions stored thereon that are executable by a first of a plurality of processors in a transactional memory system to perform: initiating transactional execution of a section of code associated with a first thread, wherein the section of code includes a plurality of memory access operations to shared memory within the transactional memory system, wherein the first processor is configured to execute the plurality of memory access operations as a collective atomic transaction with respect to one or more other threads being executed within the transactional memory system, wherein one or more of the plurality of memory access operations are operations to access a shared memory location within the shared memory, wherein concurrent access to the shared memory location by the first thread and the one or more other threads is controlled, at least in part, using a lock data structure; subsequent to initiating transactional execution and before executing any of the plurality of memory access operations to access the shared memory location, executing one of the plurality of memory access operations to read a value of the lock data structure; in response to the value of the lock data structure indicating that none of the one or more other threads holds the lock data structure, continuing execution of the remainder of the section of code; monitoring the value of the lock data structure for a subsequent change made by one of the one or more other threads to the value of the lock data structure, and aborting the transactional execution in response to detecting such a change; and in response to the value of the lock data structure indicating that one of the one or more other threads holds the lock data structure, delaying execution of the remainder of the section of code until repeated reading of the value of the lock data structure indicates that none of the one or more other threads holds the lock data structure.