Patent ID: 8051227

Claim:
A method performed in a network element for accessing queues, the method comprising the steps of: receiving a command from an agent via a first predetermined memory-mapped register, the agent being one of a plurality of agents representing a plurality of software processes, each being executed by one of a plurality of processor cores of a network processor in the network element; identifying a queue associated with the command based on the first predetermined memory-mapped register, wherein the queue was allocated in a memory; atomically reading a pointer from a hardware-based queue state register associated with the queue; atomically accessing data at a memory location of the memory based on the pointer, the memory location having been allocated as a part of the queue; and atomically updating the pointer stored in the hardware-based queue state register, including incrementing, via a first increment/decrement hardware logic, the pointer of the hardware-based queue state register, reading a queue size of the queue from a hardware-based configuration register associated with the queue, and wrapping around, via the first increment/decrement hardware logic, the pointer of the hardware-based queue state register if the pointer reaches an end of the queue based on the queue size, and whereby the pointer is obtained and updated atomically through hardware so that the software process represented by the agent is not required to obtain an exclusive access control of the queue from an Operating System.