FreeBSD/sys/dev/isci/scil/sci_abstract_list.c
/**
 * This method simply adds a LIST_ELEMENT for the supplied object to the back
 * (tail) of the supplied list.
 */
This method simply adds a LIST_ELEMENT for the supplied object to the back
(tail) of the supplied list.
This method simply adds a LIST_ELEMENT for the supplied object to the back ( tail ) of the supplied list .
void sci_abstract_list_pushback(
   SCI_ABSTRACT_LIST_T * list_p,
   void * obj_p
)
{
   SCI_ABSTRACT_ELEMENT_LIST_T * elem_list = &(list_p)->elements;
   SCI_ABSTRACT_ELEMENT_T      * alElement_p
      = private_pool_allocate((list_p)->free_pool);
   alElement_p->object_p = (obj_p);
   if (elem_list->front_p == NULL)
   {
      elem_list->front_p = elem_list->back_p = alElement_p;
   }
   else
   {
      elem_list->back_p->next_p = alElement_p;
      alElement_p->previous_p   = elem_list->back_p;
      elem_list->back_p         = alElement_p;
   }
   elem_list->size++;
}
void sci_abstract_list_pushback ( SCI_ABSTRACT_LIST_T * list_p , void * obj_p ) { SCI_ABSTRACT_ELEMENT_LIST_T * elem_list = & ( list_p ) -> elements ; SCI_ABSTRACT_ELEMENT_T * alElement_p = private_pool_allocate ( ( list_p ) -> free_pool ) ; alElement_p -> object_p = ( obj_p ) ; if ( elem_list -> front_p == NULL ) { elem_list -> front_p = elem_list -> back_p = alElement_p ; } else { elem_list -> back_p -> next_p = alElement_p ; alElement_p -> previous_p = elem_list -> back_p ; elem_list -> back_p = alElement_p ; } elem_list -> size ++ ; }
This method simply adds a LIST_ELEMENT for the supplied object to the back
 (tail) of the supplied list.
This method simply adds a LIST_ELEMENT for the supplied object to the back ( tail ) of the supplied list .
//   assert(alElement_p != NULL);