FreeBSD/sys/dev/isci/scil/scif_sas_controller.c
/**
 * @brief This routine is to allocate the memory for creating a new internal
 *        request.
 *
 * @param[in] scif_controller handle to frame controller
 *
 * @return void* address to internal request memory
 */
@brief This routine is to allocate the memory for creating a new internal
request.

@param[in] scif_controller handle to frame controller

@return void* address to internal request memory
@brief This routine is to allocate the memory for creating a new internal request . @param [ in ] scif_controller handle to frame controller @return void * address to internal request memory
void * scif_sas_controller_allocate_internal_request(
   SCIF_SAS_CONTROLLER_T * fw_controller
)
{
   POINTER_UINT internal_io_address;
   if( !sci_pool_empty(fw_controller->internal_request_memory_pool) )
   {
      sci_pool_get(
         fw_controller->internal_request_memory_pool, internal_io_address
      );
      memset((char*)internal_io_address, 0, scif_sas_internal_request_get_object_size());
      return (void *) internal_io_address;
   }
   else
      return NULL;
}
void * scif_sas_controller_allocate_internal_request ( SCIF_SAS_CONTROLLER_T * fw_controller ) { POINTER_UINT internal_io_address ; if ( ! sci_pool_empty ( fw_controller -> internal_request_memory_pool ) ) { sci_pool_get ( fw_controller -> internal_request_memory_pool , internal_io_address ) ; memset ( ( char * ) internal_io_address , 0 , scif_sas_internal_request_get_object_size ( ) ) ; return ( void * ) internal_io_address ; } else return NULL ; }
@brief This routine is to allocate the memory for creating a new internal
        request.
@brief This routine is to allocate the memory for creating a new internal request .
//clean the memory.