/*static char *SCCSID = "@(#)perfvw.h   6.7 92/02/04";*/
/*      SCCSID = "@(#)perfvw.h  6.7 92/02/04" */

/*
 *      Perfview (PVW) definitions and constants
 *
 *      This is an OS/2 2.x specific file
 *
 *      IBM/Microsoft Confidential
 *
 *      Copyright (c) IBM Corporation 1987, 1989
 *      Copyright (c) Microsoft Corporation 1987, 1989
 *
 *      All Rights Reserved
 * Modified
 * 4/28/91  Steve Best  DCR614.12    added macros for semaphores pvwsemendtm
 *                                   pvwsemstarttm
 * 9/30/91  Steve Best  b727647      added proto for demandld mem counter
 * 10/31/91 Steve Best  b728729      added proto for prc qpg  counter
 * 01/23/91 Steve Best  aa04482      fix patching for 16 bit masm code
 * 03/15/95 Change Team 101504       added new function to perfvwc.c
 *
 */

#if !(defined(INCL_32) || defined(INCL_16))
#ifdef M_I386
    #define INCL_32
#else /* not M_I386 */
    #define INCL_16
#endif /* M_I386 */
#endif /* INCL_32 || INCL_16 */

/* XLATOFF */
#ifdef INCL_32
#if defined(INCL_16)
#error message ("Illegal combination of Perfview 'C' compiler flags - 32 && 16")
#endif /* INCL_16 */
#endif /* INCL_32 */
/* XLATON */

/**************************************************************************/

/*  Miscellaneous Perfview definitions
 */

/*      High resolution timer (TMR)  status flags
 */

#define TMR_INSTALLED 0x0001    /* TMR device driver is installed. */

/**************************************************************************/

/***  Perfview Measurement Macros for 'C' code -- Creates Perfview Hook
 *
 *              _Macro name______Purpose_
 *
 *              PvwCnt          Simple event counter (increment total by 1)
 *              PvwStartTm      Start time of event (subtract from total)
 *              PvwEndTm        End time of event (add to total)
 *              PvwBulkCnt      Bulk counter (e.g. add quantity to total)
 *              PvwSumSquares   Sum of squares of count (for std deviation)
 *              PvwEnterQ       Entering queue
 *              PvwLeaveQ       Leaving queue
 *              PvwCntStartTm   Combine simple counter and start time
 *              PvwCntBulkCnt   Combine simple counter and bulk counter
 *              PvwMeasurement  Uncategorized measurement (multiple counters
 *                              and/or timers).
 *              PvwSemStartTm   Combine simple counter and start time for semaphore
 *              PvwSemEndTm     End Time of Semaphore event
 *
 *
 *              PvwCnt_proto    Generate prototype declaration for above.
 *              PvwStartTm_proto                  |
 *              PvwEndTm_proto                    |
 *              PvwBulkCnt_proto                  |
 *              PvwSumSquares_proto               |
 *              PvwEnterQ_proto                   |
 *              PvwLeaveQ_proto                   |
 *              PvwCntStartTm_proto               |
 *              PvwCntBulkCnt_proto               |
 *              PvwMeasurement_proto              |
 *              PvwSemStartTm_proto               |
 *              PvwSemEndTm_proto                 |
 *
 *
 *      32-bit 'C' code (using 32-bit compiler):
 *
 *              Currently, each of these expands to a NEAR Call of a unique
 *              patch routine.  The first time this hook is encountered, the
 *              patch routine replaces the original NEAR Call with the
 *              equivalent of a 5-byte "NOP" instruction.
 *
 *      16-bit 'C' code (using 16-bit compiler):
 *
 *              Currently, each of these expands to the equivalent of a
 *              NOP in 'C' code.  (Actual implementation T.B.D.)
 *
 *
 *
 *      ENTRY   entname         Entity name:  "cpu", "mem", etc. (see
 *                              pvwxport.h.
 *              ctrname         Counter name:  extracted from the field name
 *                              of the appropriate structure, as listed in
 *                              pvwxport.h.  (i.e. for the fields "cpu_ctInt"
 *                              and "cpu_tmInt", the <ctrname> is "Int".)
 *              instance        Instance (0 to n): Identical invocations
 *                              of this macro must have unique global labels
 *                              within the kernel. Begin with 0, and number
 *                              each instance consecutively.
 *
 *      USES    EAX, ECX, EDX, EFlags.
 *
 *      NOTES   Place the prototype for each function at the end of this
 *              file (perfvw.h) using the Pvw*_proto macros.
 *
 *              If this counter will be present in both PERFSTRICT and
 *              NON-PERFSTRICT kernels, use the non-strict macro invocation
 *              and specify GROUP = NOSTRICT in the comment block.
 *              If this counter is to be present only in a PERFSTRICT kernel,
 *              append "_strict" to the end of the appropriate macro name,
 *              and specify GROUP = STRICT in the comment block (see below).
 *
 *              Counter type abbreviations:
 *
 *                              _Macro Name__________<ctrtype>_
 *
 *                              PvwCnt                  Ct
 *                              PvwStartTm              ST
 *                              PvwEndTm                ET
 *                              PvwBulkCnt              BC
 *                              PvwSumSquares           SS
 *                              PvwEnterQ               EQ
 *                              PvwLeaveQ               LQ
 *                              PvwCntStartTm           CtST
 *                              PvwCntBulkCnt           CtBC
 *                              PvwMeasurement          Mt
 *                              PvwSemStartTm           SmST
 *                              PvwSemEndTm             SmET
 *
 *              The following comment block MUST accompany each macro
 *              invocation:
 */

/***PV - Perfview measurement hook
 */

/*------------------ Example of non-strict simple counter -----------------*/

/***PV - Perfview measurement hook
 */

/*      PvwCnt(mem,PgFault,0);                                             */

/*------------------ End example ------------------------------------------*/

/*------------------ Example of strict simple counter ---------------------*/

/***PV - Perfview measurement hook
 */

/*      PvwCnt_strict(spr,Spare1,0);                                       */

/*------------------- End example -----------------------------------------*/

#ifdef INCL_32

/*** 32-bit 'C' macros ***/

#define PvwCnt(entname,ctrname,instance) PvwPatch_Ct_##entname##_##ctrname##_##instance##()
#define PvwStartTm(entname,ctrname,instance) PvwPatch_ST_##entname##_##ctrname##_##instance##()
#define PvwEndTm(entname,ctrname,instance) PvwPatch_ET_##entname##_##ctrname##_##instance##()
#define PvwBulkCnt(entname,ctrname,instance) PvwPatch_BC_##entname##_##ctrname##_##instance##()
#define PvwSumSquares(entname,ctrname,instance) PvwPatch_SS_##entname##_##ctrname##_##instance##()
#define PvwEnterQ(entname,ctrname,instance) PvwPatch_EQ_##entname##_##ctrname##_##instance##()
#define PvwLeaveQ(entname,ctrname,instance) PvwPatch_LQ_##entname##_##ctrname##_##instance##()
#define PvwCntStartTm(entname,ctrname,instance) PvwPatch_CtST_##entname##_##ctrname##_##instance##()
#define PvwCntBulkCnt(entname,ctrname,instance) PvwPatch_CtBC_##entname##_##ctrname##_##instance##()
#define PvwMeasurement(entname,ctrname,instance) PvwPatch_Mt_##entname##_##ctrname##_##instance##()
#define PvwSemStartTm(entname,ctrname,instance) PvwPatch_SmTm_##entname##_##ctrname##_##instance##()
#define PvwSemEndTm(entname,ctrname,instance) PvwPatch_SmET_##entname##_##ctrname##_##instance##()

#define PvwCnt_proto(entname,ctrname,instance) VOID PvwPatch_Ct_##entname##_##ctrname##_##instance##(VOID)
#define PvwStartTm_proto(entname,ctrname,instance) VOID PvwPatch_ST_##entname##_##ctrname##_##instance##(VOID)
#define PvwEndTm_proto(entname,ctrname,instance) VOID PvwPatch_ET_##entname##_##ctrname##_##instance##(VOID)
#define PvwBulkCnt_proto(entname,ctrname,instance) VOID PvwPatch_BC_##entname##_##ctrname##_##instance##(VOID)
#define PvwSumSquares_proto(entname,ctrname,instance) VOID PvwPatch_SS_##entname##_##ctrname##_##instance##(VOID)
#define PvwEnterQ_proto(entname,ctrname,instance) VOID PvwPatch_EQ_##entname##_##ctrname##_##instance##(VOID)
#define PvwLeaveQ_proto(entname,ctrname,instance) VOID PvwPatch_LQ_##entname##_##ctrname##_##instance##(VOID)
#define PvwCntStartTm_proto(entname,ctrname,instance) VOID PvwPatch_CtST_##entname##_##ctrname##_##instance##(VOID)
#define PvwCntBulkCnt_proto(entname,ctrname,instance) VOID PvwPatch_CtBC_##entname##_##ctrname##_##instance##(VOID)
#define PvwMeasurement_proto(entname,ctrname,instance) VOID PvwPatch_Mt_##entname##_##ctrname##_##instance##(VOID)
#define PvwSemStartTm_proto(entname,ctrname,instance) VOID PvwPatch_SmTm_##entname##_##ctrname##_##instance##(VOID)
#define PvwSemEndTm_proto(entname,ctrname,instance) VOID PvwPatch_SmET_##entname##_##ctrname##_##instance##(VOID)


#ifdef PERFSTRICT

#define PvwCnt_strict(entname,ctrname,instance) PvwPatch_Ct_##entname##_##ctrname##_##instance##()
#define PvwStartTm_strict(entname,ctrname,instance) PvwPatch_ST_##entname##_##ctrname##_##instance##()
#define PvwEndTm_strict(entname,ctrname,instance) PvwPatch_ET_##entname##_##ctrname##_##instance##()
#define PvwBulkCnt_strict(entname,ctrname,instance) PvwPatch_BC_##entname##_##ctrname##_##instance##()
#define PvwSumSquares_strict(entname,ctrname,instance) PvwPatch_SS_##entname##_##ctrname##_##instance##()
#define PvwEnterQ_strict(entname,ctrname,instance) PvwPatch_EQ_##entname##_##ctrname##_##instance##()
#define PvwLeaveQ_strict(entname,ctrname,instance) PvwPatch_LQ_##entname##_##ctrname##_##instance##()
#define PvwCntStartTm_strict(entname,ctrname,instance) PvwPatch_CtST_##entname##_##ctrname##_##instance##()
#define PvwCntBulkCnt_strict(entname,ctrname,instance) PvwPatch_CtBC_##entname##_##ctrname##_##instance##()
#define PvwMeasurement_strict(entname,ctrname,instance) PvwPatch_Mt_##entname##_##ctrname##_##instance##()
#define PvwSemStartTm_strict(entname,ctrname,instance) PvwPatch_SmTm_##entname##_##ctrname##_##instance##()
#define PvwSemEndTm_strict(entname,ctrname,instance) PvwPatch_SmET_##entname##_##ctrname##_##instance##()

#else   /*PERFSTRICT*/

#define PvwCnt_strict(entname,ctrname,instance)
#define PvwStartTm_strict(entname,ctrname,instance)
#define PvwEndTm_strict(entname,ctrname,instance)
#define PvwBulkCnt_strict(entname,ctrname,instance)
#define PvwSumSquares_strict(entname,ctrname,instance)
#define PvwEnterQ_strict(entname,ctrname,instance)
#define PvwLeaveQ_strict(entname,ctrname,instance)
#define PvwCntStartTm_strict(entname,ctrname,instance)
#define PvwCntBulkCnt_strict(entname,ctrname,instance)
#define PvwMeasurement_strict(entname,ctrname,instance)
#define PvwSemStartTm_strict(entname,ctrname,instance)
#define PvwSemEndTm_strict(entname,ctrname,instance)

#endif  /*PERFSTRICT*/

#else   /* not INCL_32 */

/*** 16-bit 'C' macros ***/

#define PvwCnt(entname,ctrname,instance)
#define PvwStartTm(entname,ctrname,instance)
#define PvwEndTm(entname,ctrname,instance)
#define PvwBulkCnt(entname,ctrname,instance)
#define PvwSumSquares(entname,ctrname,instance)
#define PvwEnterQ(entname,ctrname,instance)
#define PvwLeaveQ(entname,ctrname,instance)
#define PvwCntStartTm(entname,ctrname,instance)
#define PvwCntBulkCnt(entname,ctrname,instance)
#define PvwMeasurement(entname,ctrname,instance)
#define PvwSemStartTm(entname,ctrname,instance)
#define PvwSemEndTm(entname,ctrname,instance)


#ifdef PERFSTRICT

#define PvwCnt_strict(entname,ctrname,instance)
#define PvwStartTm_strict(entname,ctrname,instance)
#define PvwEndTm_strict(entname,ctrname,instance)
#define PvwBulkCnt_strict(entname,ctrname,instance)
#define PvwSumSquares_strict(entname,ctrname,instance)
#define PvwEnterQ_strict(entname,ctrname,instance)
#define PvwLeaveQ_strict(entname,ctrname,instance)
#define PvwCntStartTm_strict(entname,ctrname,instance)
#define PvwCntBulkCnt_strict(entname,ctrname,instance)
#define PvwMeasurement_strict(entname,ctrname,instance)
#define PvwSemStartTm(entname,ctrname,instance)
#define PvwSemEndTm(entname,ctrname,instance)

#else   /*PERFSTRICT*/

#define PvwCnt_strict(entname,ctrname,instance)
#define PvwStartTm_strict(entname,ctrname,instance)
#define PvwEndTm_strict(entname,ctrname,instance)
#define PvwBulkCnt_strict(entname,ctrname,instance)
#define PvwSumSquares_strict(entname,ctrname,instance)
#define PvwEnterQ_strict(entname,ctrname,instance)
#define PvwLeaveQ_strict(entname,ctrname,instance)
#define PvwCntStartTm_strict(entname,ctrname,instance)
#define PvwCntBulkCnt_strict(entname,ctrname,instance)
#define PvwMeasurement_strict(entname,ctrname,instance)
#define PvwSemStartTm_strict(entname,ctrname,instance)
#define PvwSemEndTm_strict(entname,ctrname,instance)

#endif  /*PERFSTRICT*/

#endif  /* INCL_32 */

/**************************************************************************/

/* BEGIN MASM DEFINITIONS
 */

/*ASM

;***    Perfview Measurement Macros -- Creates Perfview MASM hook
;
;               _Macro name______Purpose_
;
;               PvwCnt          Simple event counter (increment total by 1)
;               PvwStartTm      Start time of event (subtract from total)
;               PvwEndTm        End time of event (add to total)
;               PvwBulkCnt      Bulk counter (e.g. add quantity to total)
;               PvwSumSquares   Sum of squares of count (for std deviation)
;               PvwEnterQ       Entering queue
;               PvwLeaveQ       Leaving queue
;               PvwCntStartTm   Combine simple counter and start time
;               PvwCntBulkCnt   Combine simple counter and bulk counter
;               PvwMeasurement  Uncategorized measurement (multiple counters
;                               and/or timers).
;               PvwSemStartTm   Combine simple counter and start time for semaphore event
;               PvwSemEndTm     End Time for semaphore event
;
;       Currently, each of these expands to the following:
;
;       USE32 segments:
;
;               Currently, each of these expands to a NEAR Call of a unique
;               patch routine.  The first time this hook is encountered, the
;               patch routine replaces the original NEAR Call with the
;               equivalent of a 5-byte "NOP" instruction.
;
;       USE16 Segments:
;
;               Currently, each of these expands to a Thunk of a NEAR Call to
;               a unique patch routine.  The first time this hook is
;               encountered, the patch routine replaces the original NEAR
;               Call with the equivalent of a 5-byte "NOP" instruction.
;               Currently, the Thunk is NOT patched out; in the future the
;               Thunk code will also be patched.  For now, these hooks are
;               only active in PERFSTRICT kernels, to avoid the extra Thunk
;               overhead in the RETAIL kernel.
;
;
;       ENTRY   entname         Entity name:  "cpu", "mem", etc. (see
;                               pvwxport.h.
;               ctrname         Counter name:  extracted from the field name
;                               of the appropriate structure, as listed in
;                               pvwxport.h.  (i.e. for the fields "cpu_ctInt"
;                               and "cpu_tmInt", the <ctrname> is "Int".)
;               instance        Instance (0 to n): Identical invocations
;                               of this macro must have unique global labels
;                               within the kernel. Begin with 0, and number
;                               each instance consecutively.
;               strict          Stricture flag:  If non-blank, the tracepoint
;                               will only be activated in a PERFSTRICT kernel.
;
;       USES    Eflags
;
;       NOTES   Counter type abbreviations:
;
;                       _Macro Name__________<ctrtype>_
;
;                       PvwCnt                  Ct
;                       PvwStartTm              ST
;                       PvwEndTm                ET
;                       PvwBulkCnt              BC
;                       PvwSumSquares           SS
;                       PvwEnterQ               EQ
;                       PvwLeaveQ               LQ
;                       PvwCntStartTm           CtST
;                       PvwCntBulkCnt           CtBC
;                       PvwMeasurement          Mt
;                       PvwSemStartTm           SmTm
;                       PvwSemEndTm             SmET
;

;       Perfview NOP instruction (multiple byte instruction having no effect)

?PvwNop macro
        db  MI_SEGDS
        db  MI_MOV_REG_REGMEM
        db  (MI_MODREG OR MI_REGAX)
endm


;       Macro for generating Perfview Hook, which is a call to patch function:

?PvwHk  macro   ctrtype,entname,ctrname,instance,fstrict
IF (?cstype eq ?CS_32bit)
        IFB <fstrict>
                IFDIF <entname>,<cal>   ;cal hooks are in same module as patch function.
                        EXTRN32 _PvwPatch_&ctrtype&_&entname&_&ctrname&_&instance
                ENDIF ;entname
                        pushf
                        CCALL32 _PvwPatch_&ctrtype&_&entname&_&ctrname&_&instance
                        popf
        ELSE ;<fstrict>
;aa04482        IFDEF PERFSTRICT
                        EXTRN32 _PvwPatch_&ctrtype&_&entname&_&ctrname&_&instance
                        pushf
                        CCALL32 _PvwPatch_&ctrtype&_&entname&_&ctrname&_&instance
                        popf
;aa04482        ENDIF ;PERFSTRICT
        ENDIF ;<fstrict>
ELSE  ;?cstype
;BUGBUG 04-Jun-90, DaveBe, <Currently, 16-bit hooks only active in PERFSTRICT kernel>.
;   IFDEF PERFSTRICT
        IFB <fstrict>
                        EXTRNF32 pvwMt_&ctrtype&_&entname&_&ctrname&_&instance
                        pushf
                        CALLF32 pvwMt_&ctrtype&_&entname&_&ctrname&_&instance,,nocheck
                        popf
        ELSE ;<fstrict>
;aa04482        IFDEF PERFSTRICT
                        EXTRNF32 pvwMt_&ctrtype&_&entname&_&ctrname&_&instance
                        pushf
                        CALLF32 pvwMt_&ctrtype&_&entname&_&ctrname&_&instance,,nocheck
                        popf
;aa04482        ENDIF ;PERFSTRICT
        ENDIF ;<fstrict>
;   ENDIF ;PERFSTRICT
ENDIF ;?cstype
endm


PvwCnt          macro   entname,ctrname,instance,fstrict
        ?PvwHk Ct,<entname>,<ctrname>,<instance>,<fstrict>
endm


PvwStartTm      macro   entname,ctrname,instance,fstrict
        ?PvwHk ST,<entname>,<ctrname>,<instance>,<fstrict>
endm


PvwEndTm        macro   entname,ctrname,instance,fstrict
        ?PvwHk ET,<entname>,<ctrname>,<instance>,<fstrict>
endm


PvwBulkCnt      macro   entname,ctrname,instance,fstrict
        ?PvwHk BC,<entname>,<ctrname>,<instance>,<fstrict>
endm


PvwSumSquares   macro   entname,ctrname,instance,fstrict
        ?PvwHk SS,<entname>,<ctrname>,<instance>,<fstrict>
endm

;       Use PvwEnterQ/PvwLeaveQ for measuring queue lengths and related
;       space-time entities.  These require just a timer.

PvwEnterQ       macro   entname,ctrname,instance,fstrict
        ?PvwHk EQ,<entname>,<ctrname>,<instance>,<fstrict>
endm

PvwLeaveQ       macro   entname,ctrname,instance,fstrict
        ?PvwHk LQ,<entname>,<ctrname>,<instance>,<fstrict>
endm

;       Use PvwCntStartTm for combination of a simple counter with a timer.
;       Use the common root name for <ctrname>.  For instance, to combine
;       the Thread entities "thd_ctFault", "thd_tmFault", use "thd_Fault" for
;       <ctrname>.  (See PvwKDef.h).

PvwCntStartTm   macro   entname,ctrname,instance,fstrict
        ?PvwHk CtST,<entname>,<ctrname>,<instance>,<fstrict>
endm

;       Use PvwCntBulkCnt for combinations of bulk and simple counters.
;       Use the common root name for <ctrname>.  For instance, to combine
;       the File entities "fil_ctRd", and "fil_ctRdByte", use "fil_Rd"
;       for <ctrname>.  (See PvwKDef.h).

PvwCntBulkCnt   macro   entname,ctrname,instance,fstrict
        ?PvwHk CtBC,<entname>,<ctrname>,<instance>,<fstrict>
endm

;       Use PvwMeasurement for combinations of counters and/or timers which
;       are not covered by any of the above macros.  Use the common root name
;       for <ctrname>.  For instance, to combine the File entities "fil_ctRd",
;       "fil_tmRd", and "fil_ctRdByte", use "fil_Rd" for <ctrname>.  (See
;       PvwKDef.h).

PvwMeasurement  macro   entname,ctrname,instance,fstrict
        ?PvwHk Mt,<entname>,<ctrname>,<instance>,<fstrict>
endm

PvwSemStartTm  macro   entname,ctrname,instance,fstrict
        ?PvwHk SmTm,<entname>,<ctrname>,<instance>,<fstrict>
endm

PvwSemEndTm  macro   entname,ctrname,instance,fstrict
        ?PvwHk SmET,<entname>,<ctrname>,<instance>,<fstrict>
endm

*/

/* END MASM DEFINITIONS
 */

/***************************************************************************/

/*      Prototypes
 */

/* XLATOFF */

extern INT TMR32QueryTime_DW(VOID);

extern INT TMR32QueryTime_CQW(PQWRD);

extern INT PVWRegisterPerfCtrs(PBYTE pbDataBlk,
                               PBYTE pbTextBlk,
                               ULONG flFlags);

extern INT PVWCreateInstance_Thd(ptda_t *pptda,
                                 tcb_t  *ptcb);

extern INT PVWKillInstance_Thd(tcb_t *ptcb);
extern VOID PVWDestroyLink(ptda_t *pptda); //101504

extern INT PVWCreateInstance_Prc(ptda_t *pptda,
                                 tcb_t  *ptcb);

extern INT PVWKillInstance_Prc(ptda_t *pptda);

extern INT PVWCreateInstance_Sem (ptda_t *pptda,
                                  tcb_t  *ptcb,
                                  PBYTE  *pPVDBSem);

extern INT PVWKillInstance_Sem (tcb_t  *ptcb,
                                PBYTE  *pPVDBSem);

/* Perfview 'C' Measurement function prototypes
 */

#ifdef INCL_32

/* Cpu hooks
 */

PvwMeasurement_proto(cpu,StateChange,0);


/* Memory hooks
 */

PvwCnt_proto(mem,DemandLd,0);

PvwCnt_proto(mem,Discard,0);

PvwMeasurement_proto(mem,PageFault,0);
PvwMeasurement_proto(mem,PageFault,1);

PvwCnt_proto(mem,SwapOut,0);
PvwCnt_proto(mem,SwapIn,0);

PvwCnt_proto(mem,Reclaim,0);
PvwEnterQ_proto(mem,QReclaim,0);
PvwLeaveQ_proto(mem,QReclaim,0);
PvwLeaveQ_proto(mem,QReclaim,1);
PvwLeaveQ_proto(mem,QReclaim,2);
PvwLeaveQ_proto(mem,QReclaim,3);
PvwLeaveQ_proto(mem,QReclaim,4);

PvwEnterQ_proto(mem,QFree,0);
PvwLeaveQ_proto(mem,QFree,0);

PvwEnterQ_proto(mem,QResident,0);
PvwLeaveQ_proto(mem,QResident,0);
PvwEnterQ_proto(mem,QResident,1);
PvwLeaveQ_proto(mem,QResident,1);

PvwEnterQ_proto(mem,QPresent,0);
PvwLeaveQ_proto(mem,QPresent,0);

PvwEnterQ_proto(mem,QShortLk,0);
PvwLeaveQ_proto(mem,QShortLk,0);

/* Prc hooks                                                           //b728729
*/                                                                     //b728729
PvwEnterQ_proto(prc,QPg,0);                                            //b728729
PvwLeaveQ_proto(prc,QPg,0);                                            //b728729

/* Thread hooks
 */

PvwStartTm_proto(thd,Sleep,0);
PvwEndTm_proto(thd,Sleep,0);

/* FBC hooks
 */

PvwCnt_proto(fbc,RdHit,0);
PvwCnt_proto(fbc,RdMiss,0);
PvwCnt_proto(fbc,WrtHit,0);
PvwCnt_proto(fbc,WrtMiss,0);
PvwStartTm_proto(fbc,Wrt,0);
PvwEndTm_proto(fbc,Wrt,0);
PvwLeaveQ_proto(fbc,QWrt,0);
PvwEnterQ_proto(fbc,QWrt,0);
PvwCnt_proto(fbc,Bypass,0);

/* Calibration hooks
 */

PvwCntStartTm_proto(cal,C,0);
PvwEndTm_proto(cal,C,0);

/* Mvdm hooks
 */

PvwCnt_proto(vdm,TrapPage,0);
PvwCnt_proto(vdm,MapPage,0);

/* Semaphore hooks
 */

PvwSemStartTm_proto(sem,Set,0);
PvwSemEndTm_proto(sem,Set,0);

PvwSemStartTm_proto(sem,Blk,0);
PvwSemEndTm_proto(sem,Blk,0);


/* Spare hooks
 */

PvwCnt_proto(spr,Spare1,0);
PvwStartTm_proto(spr,Spare1,0);
PvwEndTm_proto(spr,Spare1,0);
PvwCntStartTm_proto(spr,Spare1,0);

PvwCnt_proto(spr,Spare2,0);
PvwStartTm_proto(spr,Spare2,0);
PvwEndTm_proto(spr,Spare2,0);
PvwCntStartTm_proto(spr,Spare2,0);

PvwCnt_proto(spr,Spare3,0);
PvwStartTm_proto(spr,Spare3,0);
PvwEndTm_proto(spr,Spare3,0);
PvwCntStartTm_proto(spr,Spare3,0);

PvwCnt_proto(spr,Spare4,0);
PvwStartTm_proto(spr,Spare4,0);
PvwEndTm_proto(spr,Spare4,0);
PvwCntStartTm_proto(spr,Spare4,0);

PvwCnt_proto(spr,Spare5,0);
PvwStartTm_proto(spr,Spare5,0);
PvwEndTm_proto(spr,Spare5,0);
PvwCntStartTm_proto(spr,Spare5,0);

PvwCnt_proto(spr,Spare6,0);
PvwStartTm_proto(spr,Spare6,0);
PvwEndTm_proto(spr,Spare6,0);
PvwCntStartTm_proto(spr,Spare6,0);

PvwCnt_proto(spr,Spare7,0);
PvwStartTm_proto(spr,Spare7,0);
PvwEndTm_proto(spr,Spare7,0);
PvwCntStartTm_proto(spr,Spare7,0);

PvwCnt_proto(spr,Spare8,0);
PvwStartTm_proto(spr,Spare8,0);
PvwEndTm_proto(spr,Spare8,0);
PvwCntStartTm_proto(spr,Spare8,0);

PvwCnt_proto(spr,Spare9,0);
PvwStartTm_proto(spr,Spare9,0);
PvwEndTm_proto(spr,Spare9,0);
PvwCntStartTm_proto(spr,Spare9,0);

PvwCnt_proto(spr,Spare10,0);
PvwStartTm_proto(spr,Spare10,0);
PvwEndTm_proto(spr,Spare10,0);
PvwCntStartTm_proto(spr,Spare10,0);

#endif /* INCL_32 */

/* XLATON */
