Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
1.9 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation
  3. Module Name:
  4. logger.h
  5. Abstract:
  6. Author:
  7. Revision History:
  8. --*/
  9. #ifndef __LOGGER_H__
  10. #define __LOGGER_H__
  11. #define MAX_NOMINAL_LOG_MAP (4096 * 4)
  12. #define MAX_ABSORB_LOG_MAP (4096 * 15)
  13. #define LOG_PRIO_BOOST 2
  14. #define LOG_DATA_SIZE 80 // nominal # of bytes to log
  15. #define DOLOGAPC 0
  16. #define SignalLogThreshold(pLog) \
  17. if(pLog->Event) \
  18. { \
  19. KeSetEvent(pLog->Event, LOG_PRIO_BOOST, FALSE); \
  20. }
  21. typedef struct _PfLogInterface
  22. {
  23. LIST_ENTRY NextLog;
  24. DWORD dwLoggedEntries;
  25. DWORD dwEntriesThreshold;
  26. DWORD dwFlags; // see below
  27. PFLOGGER pfLogId;
  28. DWORD dwMapWindowSize;
  29. DWORD dwMapWindowSize2;
  30. DWORD dwMapWindowSizeFloor;
  31. PBYTE pUserAddress; // Current user VA
  32. DWORD dwTotalSize;
  33. DWORD dwPastMapped; // bytes used and no longer mapped
  34. PBYTE pCurrentMapPointer; // kernel VA of mapping
  35. DWORD dwMapCount;
  36. DWORD dwMapOffset; // offset into the mapped segment
  37. PMDL Mdl; // MDL for the mapping
  38. PIRP Irp;
  39. PRKEVENT Event;
  40. DWORD dwLostEntries;
  41. LONG UseCount;
  42. DWORD dwSignalThreshold;
  43. LONG lApcInProgress;
  44. NTSTATUS MapStatus;
  45. KSPIN_LOCK LogLock;
  46. #if DOLOGAPC
  47. DWORD ApcInited;
  48. KAPC Apc;
  49. #endif
  50. ERESOURCE Resource;
  51. } PFLOGINTERFACE, *PPFLOGINTERFACE;
  52. //
  53. // flags
  54. //
  55. #define LOG_BADMEM 0x1 // an error occurred mapping the memory
  56. #define LOG_OUTMEM 0x2 // buffer exhausted
  57. #define LOG_CANTMAP 0x4 // nothing more to map
  58. typedef struct _PfPagedLog
  59. {
  60. LIST_ENTRY Next;
  61. PPFLOGINTERFACE pLog;
  62. } PFPAGEDLOG, *PPFPAGEDLOG;
  63. #endif