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.

67 lines
1.2 KiB

  1. /*++
  2. Copyright (c) 1990 Microsoft Corporation
  3. Module Name:
  4. kdcmsup.c
  5. Abstract:
  6. Com support. Code to init a com port, store port state, map
  7. portable procedures to x86 procedures.
  8. Author:
  9. Bryan M. Willman (bryanwi) 24-Sep-90
  10. Revision History:
  11. Shielin Tzong (shielint) 10-Apr-91
  12. Add packet control protocol.
  13. --*/
  14. #include "kdp.h"
  15. LARGE_INTEGER
  16. KdpQueryPerformanceCounter (
  17. IN PKTRAP_FRAME TrapFrame
  18. );
  19. #ifdef ALLOC_PRAGMA
  20. #pragma alloc_text(PAGEKD, KdpQueryPerformanceCounter)
  21. #endif
  22. LARGE_INTEGER
  23. KdpQueryPerformanceCounter (
  24. IN PKTRAP_FRAME TrapFrame
  25. )
  26. /*++
  27. Routine Description:
  28. This function optionaly calls KeQueryPerformanceCounter for
  29. the debugger. If the trap had interrupts off, then no call
  30. to KeQueryPerformanceCounter is possible and a NULL is returned.
  31. Return Value:
  32. returns KeQueryPerformanceCounter if possible.
  33. otherwise 0
  34. --*/
  35. {
  36. if (!(TrapFrame->EFlags & EFLAGS_IF_MASK)) {
  37. LARGE_INTEGER LargeIntegerZero;
  38. LargeIntegerZero.QuadPart = 0;
  39. return LargeIntegerZero;
  40. } else {
  41. return KeQueryPerformanceCounter(0);
  42. }
  43. }