Patent ID: 7406690

Claim:
An ordered semaphore management method comprising: providing an ordered queue, the ordered queue including a plurality of threads awaiting access to a plurality of semaphores, wherein only a thread in a semaphore head (SH) state is authorized to request access to one of the plurality of semaphores, and at any given time, only one of the plurality of threads in the ordered queue is assigned the SH state; and changing a first of the plurality of threads in the ordered queue from the SH state to a pending state and a second of the plurality of threads in the ordered queue to the SH state in response to the first thread requesting access to a semaphore in a locked state thereby allowing the second thread to gain access to another semaphore in an unlocked state, wherein the first thread is not changed from the SH state to the pending state if another thread is in a pending state awaiting access to the semaphore requested by the first thread.