Leaked source code of windows server 2003
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.

146 lines
3.6 KiB

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. RxData.h
  5. Abstract:
  6. This module declares the global data used by the RDBSS file system.
  7. Author:
  8. Joe Linn [JoeLinn] 1-aug-1994
  9. Revision History:
  10. --*/
  11. #ifndef _RDBSSDATA_
  12. #define _RDBSSDATA_
  13. //
  14. #ifndef MONOLITHIC_MINIRDR
  15. extern PIO_WORKITEM RxIoWorkItem;
  16. #endif
  17. extern RX_DISPATCHER RxDispatcher;
  18. extern RX_WORK_QUEUE_DISPATCHER RxDispatcherWorkQueues;
  19. //this constants are the same as the versions in ntexapi.h
  20. // but drivers are not supposed to import that!
  21. #define RX_PROCESSOR_ARCHITECTURE_INTEL 0
  22. #define RX_PROCESSOR_ARCHITECTURE_MIPS 1
  23. #define RX_PROCESSOR_ARCHITECTURE_ALPHA 2
  24. #define RX_PROCESSOR_ARCHITECTURE_PPC 3
  25. #define RX_PROCESSOR_ARCHITECTURE_UNKNOWN 0xffff
  26. // RX_CONTEXT serialization
  27. extern KMUTEX RxSerializationMutex;
  28. #define RxAcquireSerializationMutex() \
  29. KeWaitForSingleObject(&RxSerializationMutex,Executive,KernelMode,FALSE,NULL)
  30. #define RxReleaseSerializationMutex() \
  31. KeReleaseMutex(&RxSerializationMutex,FALSE)
  32. //
  33. // The global fsd data record, and global large integer constants
  34. //
  35. extern ULONG RxElapsedSecondsSinceStart;
  36. extern NTSTATUS RxStubStatus;
  37. extern PRDBSS_DEVICE_OBJECT RxFileSystemDeviceObject;
  38. extern LARGE_INTEGER RxLargeZero;
  39. extern LARGE_INTEGER RxMaxLarge;
  40. extern LARGE_INTEGER Rx30Milliseconds;
  41. extern LARGE_INTEGER RxOneSecond;
  42. extern LARGE_INTEGER RxOneDay;
  43. extern LARGE_INTEGER RxJanOne1980;
  44. extern LARGE_INTEGER RxDecThirtyOne1979;
  45. //
  46. // The status actually returned by the FsdDispatchStub.....usually not implemented
  47. //
  48. extern NTSTATUS RxStubStatus;
  49. //
  50. // The FCB for opens that refer to the device object directly or
  51. // for file objects that reference nonFcbs (like treecons)
  52. //
  53. extern FCB RxDeviceFCB;
  54. #if 0
  55. //
  56. // Define maximum number of parallel Reads or Writes that will be generated
  57. // per one request.
  58. //
  59. #define RDBSS_MAX_IO_RUNS_ON_STACK ((ULONG) 5)
  60. //
  61. // Define the maximum number of delayed closes.
  62. //
  63. #define RDBSS_MAX_DELAYED_CLOSES ((ULONG)16)
  64. extern ULONG RxMaxDelayedCloseCount;
  65. #endif //0
  66. #if DBG
  67. //
  68. // The following variables are used to keep track of the total amount
  69. // of requests processed by the file system, and the number of requests
  70. // that end up being processed by the Fsp thread. The first variable
  71. // is incremented whenever an Irp context is created (which is always
  72. // at the start of an Fsd entry point) and the second is incremented
  73. // by read request.
  74. //
  75. extern ULONG RxFsdEntryCount;
  76. //extern ULONG RxFspEntryCount;
  77. //extern ULONG RxIoCallDriverCount;
  78. //extern ULONG RxTotalTicks[];
  79. extern ULONG RxIrpCodeCount[];
  80. #endif
  81. // The list of active RxContexts being processed by the RDBSS
  82. extern LIST_ENTRY RxSrvCalldownList;
  83. extern LIST_ENTRY RxActiveContexts;
  84. extern LONG RxNumberOfActiveFcbs;
  85. extern UNICODE_STRING s_PipeShareName;
  86. extern UNICODE_STRING s_MailSlotShareName;
  87. extern UNICODE_STRING s_MailSlotServerPrefix;
  88. extern UNICODE_STRING s_IpcShareName;
  89. extern UNICODE_STRING s_PrimaryDomainName;
  90. //
  91. // To allow NFS to run RDBSS on W2K, we now look up the kenel routine
  92. // FsRtlTeardownPerStreamContexts dynamically at run time.
  93. // This is the global variable that contains the function pointer or NULL
  94. // if the routine could not be found (as on W2K.
  95. //
  96. extern VOID (*RxTeardownPerStreamContexts)(IN PFSRTL_ADVANCED_FCB_HEADER AdvancedHeader);
  97. #endif // _RDBSSDATA_