Changeset 7115 for trunk/src/win32k
- Timestamp:
- Oct 19, 2001, 2:04:45 AM (24 years ago)
- Location:
- trunk/src/win32k/kKrnlLib/include
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/win32k/kKrnlLib/include/kKLlog.h
r6701 r7115 1 /* $Id: kKLlog.h,v 1. 1 2001-09-14 01:50:17bird Exp $1 /* $Id: kKLlog.h,v 1.2 2001-10-19 00:04:44 bird Exp $ 2 2 * 3 3 * log - C-style logging - kprintf. … … 26 26 #define dprintf kprintf 27 27 #if defined(DEBUG) && !defined(NOLOGGING) 28 #ifdef INCL_16 29 /* 16-bit */ 30 #include "vprntf16.h" 31 #define kprintf(a) printf16 a 32 #define printf this function is not used in 16-bit code! Use printf16! 28 #if 0 29 #ifdef INCL_16 30 /* 16-bit */ 31 #include <vprntf16.h> 32 #define kprintf(a) printf16 a 33 #define printf this function is not used in 16-bit code! Use printf16! 34 #else 35 /* 32-bit */ 36 #include <stdarg.h> 37 #include <kKLprintf.h> 38 #ifdef __cplusplus 39 #define kprintf(a) ::printf a 40 #else 41 #define kprintf(a) printf a 42 #endif 43 #endif 33 44 #else 34 /* 32-bit */ 35 #include <stdarg.h> 36 #include "kKLprintf.h" 37 #ifdef __cplusplus 38 #define kprintf(a) ::printf a 45 #ifndef KLOG_MOD 46 #define KLOG_MOD 0 47 #endif 48 49 #ifdef INCL_16 50 /* 16-bit */ 51 #include <vprntf16.h> 52 #define kprintf(a) printf16 a 53 #define printf this function is not used in 16-bit code! Use printf16! 39 54 #else 40 #define kprintf(a) printf a 55 /* 32-bit */ 56 #include <kKLstdarg.h> 57 #ifdef __cplusplus 58 #define kprintf(a) ::kLogv(KLOG_MOD, KLOGPOS_EXT, KLOG_TYPE_PRINTF, ::kLogFixPrintf a) 59 #else 60 #define kprintf(a) kLogv(KLOG_MOD, KLOGPOS_EXT, KLOG_TYPE_PRINTF, kLogFixPrintf a) 61 #endif 41 62 #endif 42 63 #endif -
trunk/src/win32k/kKrnlLib/include/kKLprintf.h
r6838 r7115 1 /* $Id: kKLprintf.h,v 1. 2 2001-09-27 03:04:32bird Exp $1 /* $Id: kKLprintf.h,v 1.3 2001-10-19 00:04:45 bird Exp $ 2 2 * 3 3 * printf/vprintf header file. … … 28 28 int vprintf2(const char *pszFormat, va_list args); 29 29 30 /* 31 * va_start have to be redeclared. Compiler don't accept SSToDS() as va_start argument. 32 */ 33 #undef va_start 34 #define va_start(ap, last) ap = ((va_list)SSToDS(&last)) + __nextword(last) 30 #include <kKLstdarg.h> 35 31 36 32 #ifdef __cplusplus -
trunk/src/win32k/kKrnlLib/include/kKrnlLib.h
r6737 r7115 1 /* $Id: kKrnlLib.h,v 1. 2 2001-09-17 01:44:01bird Exp $1 /* $Id: kKrnlLib.h,v 1.3 2001-10-19 00:04:45 bird Exp $ 2 2 * 3 3 * Top level header file for kKrnlLib exports. … … 61 61 */ 62 62 #ifdef INCL_KKL_LOG 63 #include "kKLstdarg.h" 64 #include "kLog.h" 63 65 #include "kKLlog.h" 64 66 #endif -
trunk/src/win32k/kKrnlLib/include/kLog.h
r7070 r7115 1 /* $Id: kLog.h,v 1. 2 2001-10-16 02:20:39bird Exp $1 /* $Id: kLog.h,v 1.3 2001-10-19 00:04:45 bird Exp $ 2 2 * 3 3 * kLog - Generic Logging and Trace Routines. … … 10 10 #define _kLog_h_ 11 11 12 #ifdef __cplusplus 13 extern "C" { 14 #endif 12 15 13 16 /******************************************************************************* … … 17 20 * Standard log types. 18 21 */ 19 #define KLOG_INITMOD 1 /* Function entry */ 20 #define KLOG_TERMMOD 2 /* Function entry */ 21 #define KLOG_ENTRY 3 /* Function entry */ 22 #define KLOG_EXIT 4 /* Function exit */ 23 #define KLOG_ASSERT 5 /* Assertion failed / Kernel Panic. */ 24 25 #define KLOG_USER 0x1000 /* First user log type. */ 22 #define KLOG_TYPE_INITMOD 1 /* Log Module Init. */ 23 #define KLOG_TYPE_TERMMOD 2 /* Log Module Termination. */ 24 #define KLOG_TYPE_START 3 /* Start sequence and function entry. */ 25 #define KLOG_TYPE_ENTRY 4 /* Function entry. */ 26 #define KLOG_TYPE_EXIT 5 /* Function exit. */ 27 #define KLOG_TYPE_STOP 6 /* Stop sequence and function exit. */ 28 #define KLOG_TYPE_PRINTF 7 /* kprintf and printf log output. */ 29 #define KLOG_TYPE_ASSERT 8 /* Assertion failed / Kernel Panic. */ 30 #define KLOG_TYPE_LOGASSERT 9 /* Assertion failed within kLog. */ 31 32 #define KLOG_TYPE_LAST_REQ KLOG_TYPE_ASSERT /* Last required type. */ 33 34 #define KLOG_TYPE_USER 0x1000 /* First user log type. */ 26 35 27 36 … … 29 38 * Flags. 30 39 */ 31 #define KLOG_TYPEDEF_PTR 0x8000 /* flags this typedef as a pointer. */ 32 #define KLOG_TYPEDEF_SIZE 0xfff /* Mask to get the size. */ 33 34 #define KLOG_TYPE_DISABLED 0x00 35 #define KLOG_TYPE_ENABLED 0x01 36 #define KLOG_TYPE_COMOUTPUT 0x10 37 #define KLOG_TYPE_MASK 0x11 40 #define KLOG_TYPEDEF_PTR 0x8000 /* flags this typedef as a pointer. */ 41 #define KLOG_TYPEDEF_SIZE 0x0fff /* Mask to get the size. */ 42 43 #define KLOG_FLAGS_DISABLED 0x0000 44 #define KLOG_FLAGS_ENABLED 0x0001 45 #ifdef RING0 46 #define KLOG_FLAGS_COMOUTPUT 0x0010 47 #else 48 #define KLOG_FLAGS_COMOUTPUT 0x0000 49 #endif 50 #define KLOG_FLAGS_MASK 0x0011 51 #define KLOG_FLAGS_AS_ABOVE 0xffff /* Inherit options from above option level. */ 38 52 39 53 /* … … 64 78 typedef unsigned long int HKLOGMOD; /* Loghandle for a module. */ 65 79 80 #ifdef _kAVL_h_ 66 81 67 82 /** … … 82 97 typedef struct kLogTypedefInfo 83 98 { 84 const char * pszType; 99 union 100 { 101 const char * pszType; 102 AVLSTRNODECORE avlnodecore; 103 } u1; 85 104 const char * pszFormat; 86 105 const unsigned short cb; … … 113 132 114 133 134 /** 135 * Describes one file. 136 */ 137 typedef struct kLogFileInfo 138 { 139 union 140 { 141 const char * pszFile; 142 AVLSTRNODECORE avlnodecore; 143 } u1; 144 unsigned short fCurrent; 145 const unsigned short fDefault; 146 } KLOGFILEINFO, *PKLOGFILEINFO; 147 148 115 149 116 150 /** … … 120 154 { 121 155 const char * pszModuleName; /* Module name. */ 122 const char * pszModuleDescription; /* Module description. */ 123 124 int cTypedefs; /* Number of typesdef in paTypedefs. */ 125 PKLOGTYPEDEFINFO paTypedefs; /* Array of typedef descriptions. */ 126 127 int cUserTypes; /* Number of user types in paUserTypes. */ 128 PKLOGTYPEINFO paUserTypes; /* Array of user type descriptions. */ 129 130 int cDefTypes; /* Number of default types in paDefTypes. */ 131 PKLOGDEFTYPEINFO paDefTypes; /* Array of default type descriptions. */ 156 const char * pszModuleDescription;/*Module description. */ 157 158 int cTypedefs; /* Number of typesdef in paTypedefs. */ 159 PKLOGTYPEDEFINFO paTypedefs; /* Array of typedef descriptions. */ 160 161 int cUserTypes; /* Number of user types in paUserTypes. */ 162 PKLOGTYPEINFO paUserTypes;/* Array of user type descriptions. */ 163 164 int cDefTypes; /* Number of default types in paDefTypes. */ 165 PKLOGDEFTYPEINFO paDefTypes; /* Array of default type descriptions. */ 166 167 int cFiles; /* Number of files in paFiles. */ 168 PKLOGFILEINFO paFiles; /* Array of per file settings. */ 132 169 133 170 /* Module Data Used by Log System - Do NOT touch! */ 134 AVLULNODECORE avlnodecore; /* AVL Tree node with module handle as key. */ 135 unsigned long ulLastSeq; /* Last sequence number. */ 171 AVLULNODECORE avlnodecore;/* AVL Tree node with module handle as key. */ 172 PAVLSTRNODECORE pavlTypedefs;/*Tree of typedef into entries. */ 173 PAVLSTRNODECORE pavlFiles; /* Tree of file into entries. */ 174 unsigned long ulLastSeq; /* Last sequence number. */ 175 unsigned short fCurrent; 176 const unsigned short fDefault; 136 177 137 178 } KLOGMODDATA, *PKLOGMODDATA; 138 139 179 #endif /* #ifdef _kAVL_h_ */ 180 181 182 /** 183 * The sequence handle on the stack. 184 */ 140 185 typedef union kLogSeqHandle 141 186 { … … 156 201 KBOOL KLIBCALL kLogInitBuffer(unsigned long cbBufferSize); 157 202 203 #ifdef _kAVL_h_ 158 204 HKLOGMOD KLIBCALL kLogInitMod(PKLOGMODDATA pMod, KLOGPOS_DECL); 205 #endif 159 206 void KLIBCALL kLogEntry(HKLOGMOD hLogMod, KLOGPOS_DECL, const char *pszFuncProto, KBOOL fOptlink, ...); 160 207 void KLIBCALL kLogExit(HKLOGMOD hLogMod, KLOGPOS_DECL, const char *pszReturnType, unsigned uReturn); 161 208 void KLIBCALL kLog(HKLOGMOD hLogMod, KLOGPOS_DECL, int iType, ...); 209 #if defined(va_arg) || defined(va_list) || defined(va_start) || defined(va_end) 210 void KLIBCALL kLogv(HKLOGMOD hLogMod, KLOGPOS_DECL, int iType, va_list args); 211 va_list KLIBCALL kLogFixPrintf(const char *pszFormat, ...); /* a hack! */ 212 #endif 162 213 163 214 #define KLOGINITMOD(pMod) kLogInitMod(pMod, KLOGPOS_EXT) 164 #define KLOGENTRY(hLogMod, pszFuncProto) kLogEntry(hLogMod, KLOGPOS_EXT, pszFuncProto, FALSE) 165 #define KLOGEXIT(hLogMod, pszType, uValue) kLogExit(hLogMod, KLOGPOS_EXT, pszType, uValue) 166 167 168 #endif 169 215 #define KLOGENTRY(hLogMod, pszProto, parg0) kLogEntry(hLogMod, KLOGPOS_EXT, pszFuncProto, FALSE, parg0) 216 #define KLOGEXIT(hLogMod, pszType, uValue) kLogExit(hLogMod, KLOGPOS_EXT, pszType, uValue) 217 218 #ifdef __cplusplus 219 } 220 #endif 221 222 #endif 223
Note:
See TracChangeset
for help on using the changeset viewer.