/**
 * @brief This method initializes the fields of the HPRQ.  It should be
 *        called during the construction of the object containing or
 *        utilizing it (i.e. SCIF_SAS_CONTROLLER).
 *
 * @param[in] fw_hprq This parameter specific the high priority request
 *            queue object being constructed.
 *
 * @return none
 */
void scif_sas_high_priority_request_queue_construct(
   SCIF_SAS_HIGH_PRIORITY_REQUEST_QUEUE_T * fw_hprq,
   SCI_BASE_LOGGER_T                      * logger
)
{
   SCIF_LOG_TRACE((
      logger,
      SCIF_LOG_OBJECT_CONTROLLER | SCIF_LOG_OBJECT_DOMAIN_DISCOVERY,
      "scif_sas_high_priority_request_queue_construct(0x%x,0x%x) enter\n",
      fw_hprq, logger
   ));

   sci_base_object_construct((SCI_BASE_OBJECT_T*) &fw_hprq->lock, logger);
   fw_hprq->lock.level = SCI_LOCK_LEVEL_NONE;

   sci_pool_initialize(fw_hprq->pool);
}
Exemple #2
0
void sci_base_logger_construct(
   SCI_BASE_LOGGER_T *this_logger
)
{
   int index;

   sci_base_object_construct(
      &this_logger->parent, this_logger
   );

   this_logger->verbosity_mask = 0;

   for (index = 0; index < SCI_BASE_LOGGER_MAX_VERBOSITY_LEVELS; index++)
   {
      this_logger->object_mask[index] = 0;
   }
}
void sci_base_phy_construct(
   SCI_BASE_PHY_T    *this_phy,
   SCI_BASE_LOGGER_T *logger,
   SCI_BASE_STATE_T  *state_table
)
{
   sci_base_object_construct(&this_phy->parent, logger);

   sci_base_state_machine_construct(
      &this_phy->state_machine,
      &this_phy->parent,
      state_table,
      SCI_BASE_PHY_STATE_INITIAL
   );

   sci_base_state_machine_start(
      &this_phy->state_machine
   );
}
void sci_base_port_construct(
   SCI_BASE_PORT_T   *this_port,
   SCI_BASE_LOGGER_T *logger,
   SCI_BASE_STATE_T  *state_table
)
{
   sci_base_object_construct(&this_port->parent, logger);

   sci_base_state_machine_construct(
      &this_port->state_machine,
      &this_port->parent,
      state_table,
      SCI_BASE_PORT_STATE_STOPPED
   );

   sci_base_state_machine_start(
      &this_port->state_machine
   );
}
Exemple #5
0
void sci_base_domain_construct(
   SCI_BASE_DOMAIN_T * this_domain,
   SCI_BASE_LOGGER_T * logger,
   SCI_BASE_STATE_T  * state_table
)
{
   sci_base_object_construct(&this_domain->parent, logger);

   sci_base_state_machine_construct(
      &this_domain->state_machine,
      &this_domain->parent,
      state_table,
      SCI_BASE_DOMAIN_STATE_INITIAL
   );

   sci_base_state_machine_start(
      &this_domain->state_machine
   );
}
void sci_base_remote_device_construct(
   SCI_BASE_REMOTE_DEVICE_T *this_device,
   SCI_BASE_LOGGER_T        *logger,
   SCI_BASE_STATE_T         *state_table
)
{
   sci_base_object_construct(
      &this_device->parent,
      logger
   );

   sci_base_state_machine_construct(
      &this_device->state_machine,
      &this_device->parent,
      state_table,
      SCI_BASE_REMOTE_DEVICE_STATE_INITIAL
   );

   sci_base_state_machine_start(
      &this_device->state_machine
   );
}
Exemple #7
0
void sci_base_request_construct(
   SCI_BASE_REQUEST_T *this_request,
   SCI_BASE_LOGGER_T  *my_logger,
   SCI_BASE_STATE_T   *my_state_table
)
{
   sci_base_object_construct(
      &this_request->parent,
      my_logger
   );

   sci_base_state_machine_construct(
      &this_request->state_machine,
      &this_request->parent,
      my_state_table,
      SCI_BASE_REQUEST_STATE_INITIAL
   );

   sci_base_state_machine_start(
      &this_request->state_machine
   );
}