windows-nt/Source/XPSP1/NT/base/ntos/kd64/i386/kdcmsup.c
2020-09-26 16:20:57 +08:00

64 lines
1.2 KiB
C
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*++
Copyright (c) 1990 Microsoft Corporation
Module Name:
kdcmsup.c
Abstract:
Com support. Code to init a com port, store port state, map
portable procedures to x86 procedures.
Author:
Bryan M. Willman (bryanwi) 24-Sep-90
Revision History:
Shielin Tzong (shielint) 10-Apr-91
Add packet control protocol.
--*/
#include "kdp.h"
LARGE_INTEGER
KdpQueryPerformanceCounter (
IN PKTRAP_FRAME TrapFrame
);
#ifdef ALLOC_PRAGMA
#pragma alloc_text(PAGEKD, KdpQueryPerformanceCounter)
#endif
LARGE_INTEGER
KdpQueryPerformanceCounter (
IN PKTRAP_FRAME TrapFrame
)
/*++
Routine Description:
This function optionaly calls KeQueryPerformanceCounter for
the debugger. If the trap had interrupts off, then no call
to KeQueryPerformanceCounter is possible and a NULL is returned.
Return Value:
returns KeQueryPerformanceCounter if possible.
otherwise 0
--*/
{
if (!(TrapFrame->EFlags & EFLAGS_INTERRUPT_MASK)) {
LARGE_INTEGER LargeIntegerZero;
LargeIntegerZero.QuadPart = 0;
return LargeIntegerZero;
} else {
return KeQueryPerformanceCounter(0);
}
}