CPC G06F 9/3009 (2013.01) [G06F 9/3802 (2013.01); G06F 9/52 (2013.01); G06F 9/526 (2013.01); G06F 12/0802 (2013.01); G06F 13/1663 (2013.01); G06F 13/1689 (2013.01); G06F 2212/60 (2013.01)] | 20 Claims |
1. A method comprising:
performing, by a thread of a plurality of threads executed on one or more processors, an operation to allocate a lock for exclusive access to a resource, comprising:
selecting a location of a long term wait value different from a location of a grant value indicating a value of a ticket currently holding the lock;
waiting for the long term wait value at the selected location to indicate that a contention condition for the thread has been met; and
waiting, responsive to the contention condition being met, for the grant value to equal a value of a ticket held by the thread.
|