GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> ITC / V3-9-2 > itc / linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

ITC_control.c File Reference

Control routines for ITC. More...

#include <string.h>
#include <CPU_DB/CPU_DB_pubdefs.h>
#include <PBS/FFS.ih>
#include <PBS/FPA.h>
#include <PBS/MBA.h>
#include <PBS/MTX.h>
#include <PBS/RW.ih>
#include <MSG/MSG_pubdefs.h>
#include <ITC/ITC_msgs.h>
#include <ITC_prvdefs.h>

Functions

unsigned int ITC_initialize (ITC_NodeID deprecated)
 Initialize the ITC control block.
unsigned int ITC_insertMap (unsigned int nim, ITC_TaskID tid)
 Insert entries into the ITC node map.
unsigned int ITC_removeMap (unsigned int nim)
 Remove entries from the ITC node map.
unsigned int ITC_shutdown ()
 Shut down the ITC system.

Variables

ITC_ControlITC_icb
 Control block for the inter-task communications system.
ITC_TaskITC_tpl [ITC_L_TASKS]
 Application/service/lightweight task pointer list.
ITC_QueueITC_qpl [ITC_L_TASKS][ITC_L_QUEUES]
 Queue pointer list.
ITC_ApidITC_apl [ITC_L_APIDS]
 APID pointer list.
const char * ITC_ctl_states [ITC_L_CTL_STATES]
 String constants for ITC control block states.


Detailed Description

Control routines for ITC.

CVS $Id: ITC_control.c,v 1.10 2011/03/25 21:01:11 apw Exp $
Author:
A.P.Waite
ITC_control.c provides all the basic control routines for ITC.

Function Documentation

unsigned int ITC_initialize ( ITC_NodeID  deprecated  ) 

Initialize the ITC control block.

Parameters:
deprecated Parameter no longer used ... it is ignored
Return values:
ITC_ALOCFAIL Memory allocation failure
ITC_CTLSTAT ITC control block not in state uninitialized
ITC_MUALOCFL Cannot allocate a mutex
ITC_TYPENID Cannot identify the type of node (SIU, EPU, SC)
ITC_SUCCESS Success
ITC_initialize() initializes the ITC system.

References _ITC_Control::cnt, ITC_CTL_INITIALIZED, ITC_CTL_UNINITIALIZED, ITC_L_NODES, ITC_NID_EPU0, ITC_NID_EPU3, ITC_NID_NONE, ITC_NID_SC, ITC_NID_SIU, ITC_TID_NONE, _ITC_Control::map, _ITC_Control::mtx, _ITC_Control::nid, _ITC_Control::nim, _ITC_Map::pnid, _ITC_Map::ptid, _ITC_Control::rwi, _ITC_Control::state, and _ITC_Control::tran.

unsigned int ITC_insertMap ( unsigned int  nim,
ITC_TaskID  tid 
)

Insert entries into the ITC node map.

Parameters:
nim (in) Mask of nodes to be mapped to the given task ID
tid (in) Task ID that will serve as proxy for the listed nodes
Return values:
ITC_CTLSTAT ITC control block not in state initialized
ITC_NOTINIT ITC system not initialized
ITC_SUCCESS Success
ITC_insertMap() puts proxy node/task entries into the ITC node map.

References ITC_CTL_INITIALIZED, _ITC_Control::map, _ITC_Control::mtx, _ITC_Control::nim, _ITC_Map::ptid, _ITC_Control::rwi, and _ITC_Control::state.

unsigned int ITC_removeMap ( unsigned int  nim  ) 

Remove entries from the ITC node map.

Parameters:
nim (in) Mask of nodes to be mapped
Return values:
ITC_CTLSTAT ITC control block not in state initialized
ITC_NOTINIT ITC system not initialized
ITC_SUCCESS Success
ITC_removeMap() removes proxy node/task entries from the ITC node map.

References ITC_CTL_INITIALIZED, ITC_TID_NONE, _ITC_Control::map, _ITC_Control::mtx, _ITC_Control::nim, _ITC_Map::ptid, _ITC_Control::rwi, and _ITC_Control::state.

unsigned int ITC_shutdown ( void   ) 

Shut down the ITC system.

Return values:
ITC_CTLACTIV ITC control block still managing >0 tasks
ITC_CTLSTAT ITC control block not in state initialized
ITC_NOTINIT ITC system not initialized
ITC_SUCCESS Success
ITC_shutdown() shuts down the ITC system.

References _ITC_Control::cnt, ITC_CTL_INITIALIZED, ITC_CTL_UNINITIALIZED, ITC_NID_NONE, _ITC_Control::mtx, _ITC_Control::nid, and _ITC_Control::state.


Variable Documentation

ITC_Apid* ITC_apl[ITC_L_APIDS]

APID pointer list.

A mapping table to go from APID/function code to task/queue/callback. This is global, so care must be taken when writing elements of this table that the code is properly protected.

Referenced by ITC_attachApid(), ITC_deleteTask(), ITC_detachApid(), ITC_dispatchApp(), ITC_mapApid2Queue(), ITC_redirectApid(), and ITC_removeQueue().

const char* ITC_ctl_states[ITC_L_CTL_STATES]

Initial value:

{
    "uninitialized",
    "initialized"
}
String constants for ITC control block states.

Referenced by checkState(), ITC_attachCmdConfirm(), ITC_createTask(), ITC_detachCmdConfirm(), and ITC_reportConfiguration().

ITC_Queue* ITC_qpl[ITC_L_TASKS][ITC_L_QUEUES]

Queue pointer list.

Per queue control block for the inter-task communications system. These are global, so care must be taken when writing elements of these blocks that the code is properly protected.

Referenced by ableQueues(), createQueues(), deleteQueues(), ITC_addQueue(), ITC_attachApid(), ITC_attachCommand(), ITC_attachMemory(), ITC_attachRaw(), ITC_convertDispatch(), ITC_convertFork(), ITC_deleteTask(), ITC_detachCommand(), ITC_detachMemory(), ITC_detachRaw(), ITC_getForkQueueHandle(), ITC_isTaskDrained(), ITC_mapApid2Queue(), ITC_mapDst2Queue(), ITC_removeQueue(), ITC_revertDispatch(), ITC_send(), ITC_stopTask(), and startTask().

ITC_Task* ITC_tpl[ITC_L_TASKS]

Application/service/lightweight task pointer list.

Per task control block for the inter-task communications system. These are global, so care must be taken when writing elements of these blocks that the code is properly protected.

Referenced by ableQueues(), ITC_copyCounts(), ITC_createTask(), ITC_deleteTask(), ITC_detachApid(), ITC_dispatch(), ITC_getForkQueueHandle(), ITC_getTaskHandle(), ITC_redirectApid(), ITC_reportConfiguration(), ITC_send(), ITC_setCmdConfirm(), and ITC_setMsgResponse().


Generated on Fri Sep 30 18:18:14 2011 by  doxygen 1.5.8