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.

73 lines
1.3 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. ntnap.h
  5. Abstract:
  6. This module contains the data structure decalrations for
  7. profiling of NT API's.
  8. Author:
  9. Russ Blake (russbl) 22-Apr-1991
  10. Revision History:
  11. --*/
  12. //
  13. // Initialization of minimum times
  14. //
  15. #define MAX_LONG 0x7FFFFFFFL
  16. #define MAX_ULONG 0xFFFFFFFFL
  17. //
  18. // Timer calibration
  19. //
  20. #define NUM_ITERATIONS 2000 // Number of iterations
  21. #define MIN_ACCEPTABLEOVERHEAD 10 // Minimum overhead allowed
  22. #define NAP_CALIBRATION_SERVICE_NUMBER -1L // Calibration Routine Number
  23. typedef struct _NAPCONTROL {
  24. //
  25. // The following assures the area will be initialized only once.
  26. // Note: Assumes the section is given to us zero filled.
  27. //
  28. BOOLEAN Initialized;
  29. //
  30. // Profiling control. If NapPaused > 0, NapRecordInfo will
  31. // collect no data. Used to keep initialization and dumping
  32. // of data itself from being profiled.
  33. //
  34. BOOLEAN Paused;
  35. } NAPCONTROL, *PNAPCONTROL;
  36. extern PCHAR NapNames[];
  37. //
  38. // Called internally
  39. //
  40. VOID NapDllInit (VOID);
  41. VOID NapRecordInfo (IN ULONG, IN LARGE_INTEGER[]);
  42. NTSTATUS NapCreateDataSection (PNAPCONTROL *);
  43. //
  44. // Called by us
  45. //
  46. extern VOID NapCalibrate (VOID);
  47. extern VOID NapSpinOnSpinLock (ULONG *);
  48. extern VOID NapReleaseSpinLock (ULONG *);