Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

sah_Head_Desc * sah_Find_With_State ( sah_Queue_Status  state  ) 

Handle the IDLE state.

This is a helper function for Queue Manager. This function finds the first entry in the Queue Manager's queue whose state matches the given input state. This function starts at the head of the queue and works towards the tail. If a matching entry was found, the address of the entry is returned.

state A sah_Queue_Status value.
The desc_queue_lock must be held before calling this function.
A pointer to a sah_Head_Desc that matches the given state.

NULL otherwise.

Definition at line 510 of file sah_queue_manager.c.

References FALSE, sah_Queue::head, sah_Head_Desc::next, sah_Head_Desc::status, and TRUE.

Referenced by sah_Handle_Interrupt(), sah_Queue_Manager_Append_Entry(), sah_Queue_Manager_Prime(), and sah_reset_sahara_request().

      sah_Head_Desc *current_entry = NULL;
      sah_Head_Desc *ret_val = NULL;
      int done_looping = FALSE;

      /* Start at the head */
      current_entry = main_queue->head;

      while ((current_entry != NULL) && (done_looping == FALSE)) {
            if (current_entry->status == state) {
                  done_looping = TRUE;
                  ret_val = current_entry;
            /* Jump to the next entry. */
            current_entry = current_entry->next;

      return ret_val;
}                       /* sah_postprocess_queue */

Generated by  Doxygen 1.6.0   Back to index