Patent ID: 8830829

Claim:
A method comprising: receiving, at a network processor having a plurality of core processors and a plurality of special purpose processors, a plurality of data packets; and performing, by a core processor of the core processors, a set of network operations on a data packet of the data packets, the set of network operations performed on the data packet in a single thread of the core processor, the performing the set of network operations including: requesting, by the core processor, one or more of the special purpose processors to perform a subset of the set of network operations on the data packet atomically, and performing, by the one or more special purpose processors, the subset of the set of network operations on the data packet atomically, wherein an atomicity of each network operation of the subset of the set of network operations is achieved using a semaphore, the semaphore restricting access to shared resources of the network processor to a special purpose processor of the one or more special purpose processors while the special purpose processor is performing the corresponding network operation on the data packet, the shared resources used for performing the subset of the set of network operations on the data packet.