Patent ID: 7823150
Filing Date: 2010-10-26
Classification: G06F

Abstract:
1. A computer-implemented method for automatically transforming a locking primitive for a shared data object to permit multiple synchronized threads of a program to simultaneously hold read-only locks on the shared data object, comprising: performing a field access analysis on a lock word of the locking primitive for the shared data object in a header of the shared data object to determine whether a predetermined set of conditions are met, wherein the predetermined set of conditions indicate the shared data object is available to be locked by multiple read-only threads; when the set of predetermined conditions are met, automatically transforming the locking primitive for the shared data object by setting a thread identifier field of the lock word to a predetermined value, the predetermined value not being a thread identifier and indicating that additional threads are allowed to simultaneously hold a read-only lock on the shared data object; and incrementing a thread count in a thread count field of the lock work for each read-only lock simultaneously obtained on the shared data object, wherein a read-write lock on the shared data object is not permitted while a read-only lock exists.