home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v5.zip / DDKX86 / SRC / DEV / DASD / IBM / IBM2ADSK / LOG.H < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-14  |  3.5 KB  |  76 lines

  1. /*DDK*************************************************************************/
  2. /*                                                                           */
  3. /* COPYRIGHT    Copyright (C) 1995 IBM Corporation                           */
  4. /*                                                                           */
  5. /*    The following IBM OS/2 WARP source code is provided to you solely for  */
  6. /*    the purpose of assisting you in your development of OS/2 WARP device   */
  7. /*    drivers. You may use this code in accordance with the IBM License      */
  8. /*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
  9. /*    Copyright statement may not be removed.                                */
  10. /*                                                                           */
  11. /*****************************************************************************/
  12. /*******************\
  13. *
  14. * Logging defines
  15. *
  16. \*******************/
  17. #if defined (LOGGING)
  18.  
  19.    #define MAXLOGBUF   400             // Max number of log entries
  20.  
  21.    #define LOG_INTH      0x11          // start of int handler
  22.    #define LOG_INTHE1    0x12          // EOI (exceeded nesting level)
  23.    #define LOG_INTHE2    0x13          // EOI (normal)
  24.    #define LOG_STAGE     0x21          // start of StageABIOSRequest
  25.    #define LOG_STAGE2    0x22          // StageABIOSRequest after ABIOS call
  26.    #define LOG_STAGE3    0x23          // StageABIOSRequest IntClaimed
  27.    #define LOG_STAGE4    0x24          // StageABIOSRequest stage on INT
  28.    #define LOG_STAGE5    0x25          // StageABIOSRequest stage on Time
  29.    #define LOG_STAGE6    0x26          // StageABIOSRequest exit
  30.    #define LOG_IORB      0x31          // IORB request router
  31.    #define LOG_STARTLCB  0x41          // Start LCB
  32.    #define LOG_ABERR     0x51          // ABIOSErrortoRC decrements LID
  33.    #define LOG_BUSYQ     0x61          // RetryLCBBusyQ dec's LID, still !0
  34.    #define LOG_BUSYQ2    0x62          // RetryLCBBusyQ dec's LID, now 0
  35.    #define LOG_DEFINT    0x71          // ProcessDefaultInt
  36.  
  37.  
  38.    typedef struct
  39.    {
  40.       UCHAR   cLogID;                  // What Log Entry is this?
  41.       UCHAR   cLidIndex;               // What LID are we working on?
  42.       USHORT  nLine;                   // Line Number in source file
  43.       USHORT  nIntFlags;               // Current value of IntFlags
  44.       UCHAR   cLidCount;               // Count of outstanding ops on this LID
  45.       UCHAR   cIntCount;               // Count of interrupting stages
  46.       USHORT  nParm1;                  // 1st parameter (defined by a log entry)
  47.       USHORT  nParm2;                  // 2nd parameter
  48.       USHORT  nParm3;                  // 3rd parameter
  49.       USHORT  nParm4;                  // 4th parameter
  50.    } LOG;
  51.  
  52.    typedef LOG *PLOG;
  53.  
  54.     extern LOG alogHistory[ MAXLOGBUF ];
  55.     extern PLOG plogCurrent;
  56.  
  57.     extern void LogEvent( UCHAR cLogID,
  58.           UCHAR  cLidIndex,
  59.           USHORT nLine,
  60.           USHORT nIntFlags,
  61.           UCHAR  cLidCount,
  62.           UCHAR  cIntCount,
  63.           USHORT nParm1,
  64.           USHORT nParm2,
  65.           USHORT nParm3,
  66.           USHORT nParm4);
  67.  
  68.     #define LogHere( cLogID, nParm1, nParm2, nParm3, nParm4 )  \
  69.         LogEvent( cLogID, (UCHAR)npLCB->LidIndex, __LINE__,npLCB->IntFlags,(UCHAR)LidIOCount[npLCB->LidIndex], (UCHAR)npLCB->IntCount, nParm1, nParm2, nParm3, nParm4)
  70.  
  71. #else  /* no logging desired */
  72.  
  73.     #define LogHere( cLogID, nParm1, nParm2, nParm3, nParm4 )
  74.  
  75. #endif /* LOGGING */
  76.