A logic system in a data packet processor is provided for selecting and
releasing one of a plurality of contexts. The selected and released
context is dedicated for enabling the processing of interrupt service
routines corresponding to interrupts generated in data packet processing
and pending for service. The system comprises, a first determination
logic for determining control status of all of the contexts, a second
determination logic for determining if a context is idle or not, a
selection logic for selecting a context and a context release mechanism
for releasing the selected context. Determination by the logic system
that all contexts are singularly owned by an entity not responsible for
packet processing and that at least one of the contexts is idle, triggers
immediate selection and release of an idle one of the at least one idle
contexts to an entity responsible for packet processing.