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.

66 lines
1.3 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. #if !defined(_TRUSTED_WINDOWS_)
  16. LARGE_INTEGER
  17. KdpQueryPerformanceCounter (
  18. IN PKTRAP_FRAME TrapFrame
  19. );
  20. #ifdef ALLOC_PRAGMA
  21. #pragma alloc_text(PAGEKD, KdpQueryPerformanceCounter)
  22. #endif
  23. LARGE_INTEGER
  24. KdpQueryPerformanceCounter (
  25. IN PKTRAP_FRAME TrapFrame
  26. )
  27. /*++
  28. Routine Description:
  29. This function optionaly calls KeQueryPerformanceCounter for
  30. the debugger. If the trap had interrupts off, then no call
  31. to KeQueryPerformanceCounter is possible and a NULL is returned.
  32. Return Value:
  33. returns KeQueryPerformanceCounter if possible.
  34. otherwise 0
  35. --*/
  36. {
  37. if (!(TrapFrame->EFlags & EFLAGS_INTERRUPT_MASK)) {
  38. LARGE_INTEGER LargeIntegerZero;
  39. LargeIntegerZero.QuadPart = 0;
  40. return LargeIntegerZero;
  41. } else {
  42. return KeQueryPerformanceCounter(0);
  43. }
  44. }
  45. #endif // #if !TRUSTED_WINDOWS