GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LSW / V3-0-1 > lsw / rhel6-32


Interface   Data Structures   File List   Data Fields   Globals  

LSW_prvdefs.h File Reference

Private definitions for the LSW trace facility. More...

#include <PBS/FORK.h>
#include <PBS/FPA.h>
#include <PBS/MTX.h>
#include <PBS/RW.ih>
#include <PBS/WUT.h>
#include <IMM/FPM_pubdefs.h>
#include <IMM/RBM_pubdefs.h>
#include <ITC/ITC_pubdefs.h>
#include <TRC/TRC_pubdefs.h>

Classes

struct  _LSW_Tickle
 Structure of a fork message to tickle the mLSW task. More...
struct  _LSW_Dispatch
 Structure used to dispatch messages on the control queue. More...
struct  _LSW_Monitor
 Save/copy control/indirection to real monitor records. More...
struct  _LSW_Control
 Structure of trace control block. More...

Typedefs

typedef enum _LSW_ControlState LSW_ControlState
 Typedef for enum _LSW_ControlState.
typedef struct _LSW_Tickle LSW_Tickle
 Typedef for struct _LSW_Tickle.
typedef struct _LSW_Dispatch LSW_Dispatch
 Typedef for struct _LSW_Dispatch.
typedef struct _LSW_Monitor LSW_Monitor
 Typedef for struct _LSW_Monitor.
typedef struct _LSW_Control LSW_Control
 Typedef for struct _LSW_Control.

Enumerations

enum  _LSW_ControlState {
  LSW_CTL_UNINITIALIZED = 0,
  LSW_CTL_BROKEN = 1,
  LSW_CTL_INITIALIZED = 2,
  LSW_CTL_STARTING = 3,
  LSW_CTL_STARTED = 4
}
 Enumeration of trace control states. More...

Functions

unsigned int LSW_copyMonitor (ITC_NodeID nid, TRC_Monitor *mon)
 Make a coherent (thread safe) copy of a monitor record.
unsigned int LSW_saveMonitor (LSW_Control *lcb, ITC_NodeID nid, TRC_Monitor *new)
 Save a coherent (thread safe) copy of a monitor record.

Variables

LSW_ControlLSW_lcb
 Control block for LSW facility.


Detailed Description

Private definitions for the LSW trace facility.

CVS $Id: LSW_prvdefs.h,v 1.6 2011/03/29 20:50:12 apw Exp $
Author:
A.P.Waite

Enumeration Type Documentation

Enumeration of trace control states.

Enumerator:
LSW_CTL_UNINITIALIZED  Uninitialized
LSW_CTL_BROKEN  Fatal error
LSW_CTL_INITIALIZED  Initialized
LSW_CTL_STARTING  Starting
LSW_CTL_STARTED  Started


Function Documentation

unsigned int LSW_copyMonitor ( ITC_NodeID  nid,
TRC_Monitor *  mon 
)

Make a coherent (thread safe) copy of a monitor record.

Parameters:
nid (in) Node ID
mon (out) Monitor record
Return values:
LSW_CANTCOPY Cannot make a coherent copy
LSW_NODENOT Not a monitored node
LSW_NORECORD Monitor record not available
LSW_NOTINIT LSW system not initialized
LSW_PARMNULL Caller passed a null parameter
LSW_SUCCESS Success
Warning:
Quite apart from the usual snafus (node ID out of range, mon pointer is NULL), there are circumstances where this routine can fail. This is limited to the case of the calling task not seeing enough cycles to copy the complete monitor record before it gets updated again. This should be a very rare occurence, but calling routines should check the return code for this (as they should be doing anyway!).
LSW_copyMonitor() makes a copy (in a thread safe manner) of the latest monitor record for node nid.

References _LSW_Monitor::cnt, _LSW_Control::latest, LSW_CTL_STARTED, LSW_lcb, _LSW_Monitor::pnt, and _LSW_Control::state.

Referenced by LSW_differMonitor().

unsigned int LSW_saveMonitor ( LSW_Control lcb,
ITC_NodeID  nid,
TRC_Monitor *  new 
)

Save a coherent (thread safe) copy of a monitor record.

Parameters:
lcb (in) LSW control block
nid (in) Node ID the monitor record applies to
new (in) New monitor record to be saved
LSW_saveMonitor() saves a monitor record in a thread-safe manner.

References _LSW_Monitor::cnt, _LSW_Control::latest, _LSW_Monitor::pnt, _LSW_Control::rwi, and _LSW_Control::scratch.

Referenced by control_rx(), and forkTickle().


Generated on Tue Nov 29 17:21:25 2011 by  doxygen 1.5.8