Patent ID: 8943502
Filing Date: 2015-01-27
Classification: G06F

Abstract:
1. A computer implemented method for retooling lock interfaces for using a dual mode reader writer lock (DML), the computer implemented method comprising: receiving an invocation of a method using an interface, the method configured to operate on a lock associated with a resource in a data processing system; determining whether the lock is an upgraded lock, the upgraded lock being the DML operating in an upgraded mode, wherein the DML comprises an original lock and a set of expanded lock elements such that write access to the resource is acquired, held, and released using the original lock and the read access is acquired, held, and released using one of (i) the original lock and (ii) an expanded lock in the set of expanded locks, wherein a read-mode indicator in the original lock is set to a first value when the dual mode reader writer lock is used to manage read access only and the read-mode indicator in the original lock is set to a second value when the dual mode reader writer lock is used to manage a read access as well as a write access, the original lock maintaining an index of expanded lock elements in the set of expanded lock elements, modes of operation of the DML comprising a first mode of operating by using only the original lock as a reader writer lock (RWL) and a second mode of operating by using a combination of the original lock and at least one expanded lock element from the set of expanded lock elements, and wherein the first mode is indicated by setting an indicator in the original lock to a first value and the second mode is indicated by setting the indicator in the original lock to a second value; and executing, responsive to the lock being the upgraded lock, an operation on the DML corresponding to the method.