Methods and apparatus for locking objects in a multi-threaded environment
First Claim
27. For use in a multi-thread environment, an apparatus for locking an object to permit a thread to exclusively execute at least a portion of a routine associated with the object, the apparatus comprising:
- an object owner controller to determine an identity of a thread owning the object; and
a lock owner controller to lock the object via an atomic execution if (1) no thread owns the object or (2) a thread other than the thread seeking to lock the object owns the object, and to lock the object without an atomic execution if the thread seeking to lock the object owns the object.
1 Assignment
0 Petitions
Accused Products
Abstract
Apparatus and methods for locking objects in a multi-threaded environment are provided. An example method permits a first thread to lock an object to exclusively execute at least a portion of a routine associated with the object. The method includes, if the object is owned by a second thread, locking the object via an atomic execution and assigning ownership of the object to the first thread. It also includes, if the object is owned by the first thread, locking the object without an atomic execution.
-
Citations
42 Claims
-
27. For use in a multi-thread environment, an apparatus for locking an object to permit a thread to exclusively execute at least a portion of a routine associated with the object, the apparatus comprising:
-
an object owner controller to determine an identity of a thread owning the object; and
a lock owner controller to lock the object via an atomic execution if (1) no thread owns the object or (2) a thread other than the thread seeking to lock the object owns the object, and to lock the object without an atomic execution if the thread seeking to lock the object owns the object. - View Dependent Claims (28, 29, 30, 31, 32)
-
-
33. For use in a multi-thread environment, a method of permitting a first thread to lock an object to exclusively execute at least a portion of a routine associated with the object, the method comprising:
-
if the object is owned by a second thread, locking the object via an atomic execution and assigning ownership of the object to the first thread;
if the object is owned by the first thread, locking the object without an atomic execution. - View Dependent Claims (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 34, 35, 36)
-
-
35-1. A method as defined in claim 33 wherein locking the object via an atomic execution comprises:
-
determining if a first flag field associated with the object has a first predetermined state;
determining if a second flag field associated with the object has a second predetermined state; and
if the first flag field has the first predetermined state and the second flag field has the second predetermined state, setting the first flag field to a third predetermined state.
-
-
37. A tangible medium storing software for locking an object to permit a thread to exclusively execute at least a portion of a routine associated with the object, the tangible medium comprising:
-
first software to determine an identity of a thread owning the object; and
second software to lock the object via an atomic execution if (1) no thread owns the object or (2) a thread other than the thread seeking to lock the object owns the object, and to lock the object without an atomic execution if the thread seeking to lock the object owns the object. - View Dependent Claims (38, 39, 40, 41, 42)
-
Specification