Patent ID: 6973521

Claim:
A method for accessing a shared resource of an intermediate network device having a plurality of processors capable of attempting access to the shared resource, the method comprising the steps of: providing a lock controller hardware device having logic with both blocking and non-blocking lock request capabilities for selecting a processor from among the plurality of processors attempting to access the shared resource; executing a semaphore instruction at the at least one processor, the semaphore instruction associated with the lock requests to enable locking of the shared resource; and providing a blocking/non-blocking operand as a parameter of the semaphore instruction, the blocking/non-blocking operand distinguishing the blocking and non-blocking lock request associated with the semaphore instruction; and one of either, issuing a blocking lock request from at least one processor to the lock controller, the blocking request remaining pending at the lock controller until the shared resource is available, if the resource is not immediately available requiring the processor to poll the lock controller to determine when the resource is available, and precluding the processor from issuing another lock request to another shared resource until the pending blocking lock request is granted, and issuing a non-blocking lock request from the at least one processor to the lock controller, the non-blocking request querying the lock controller as to the immediate availability of the shared resource if the resource is not available enabling the processor to reissue the non-blocking lock request at a later time.