mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 15:02:01 +00:00
[WDF] Add Windows Driver Framework files
Takern from Microsoft GitHub repo:
d9c6040fe9
Licensed under MIT
This commit is contained in:
parent
545df81502
commit
8a978a179f
475 changed files with 285099 additions and 0 deletions
95
sdk/lib/drivers/wdf/shared/inc/primitives/common/mxtimer.h
Normal file
95
sdk/lib/drivers/wdf/shared/inc/primitives/common/mxtimer.h
Normal file
|
@ -0,0 +1,95 @@
|
|||
/*++
|
||||
|
||||
Copyright (c) Microsoft Corporation
|
||||
|
||||
ModuleName:
|
||||
|
||||
MxTimer.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Mode agnostic definiton of timer
|
||||
|
||||
See MxTimerKm.h and MxTimerUm.h for
|
||||
mode specific implementations
|
||||
|
||||
Author:
|
||||
|
||||
|
||||
Revision History:
|
||||
|
||||
|
||||
|
||||
--*/
|
||||
|
||||
#pragma once
|
||||
|
||||
class MxTimer
|
||||
{
|
||||
private:
|
||||
//
|
||||
// Handle to the timer object
|
||||
//
|
||||
MdTimer m_Timer;
|
||||
|
||||
public:
|
||||
|
||||
__inline
|
||||
MxTimer(
|
||||
VOID
|
||||
);
|
||||
|
||||
__inline
|
||||
~MxTimer(
|
||||
VOID
|
||||
);
|
||||
|
||||
CHECK_RETURN_IF_USER_MODE
|
||||
__inline
|
||||
NTSTATUS
|
||||
Initialize(
|
||||
__in_opt PVOID TimerContext,
|
||||
__in MdDeferredRoutine TimerCallback,
|
||||
__in LONG Period
|
||||
);
|
||||
|
||||
CHECK_RETURN_IF_USER_MODE
|
||||
__inline
|
||||
NTSTATUS
|
||||
InitializeEx(
|
||||
__in_opt PVOID TimerContext,
|
||||
__in MdExtCallbackType TimerCallback,
|
||||
__in LONG Period,
|
||||
__in ULONG TolerableDelay,
|
||||
__in BOOLEAN UseHighResolutionTimer
|
||||
);
|
||||
|
||||
__inline
|
||||
VOID
|
||||
Start(
|
||||
__in LARGE_INTEGER DueTime,
|
||||
__in ULONG TolerableDelay = 0
|
||||
);
|
||||
|
||||
__inline
|
||||
BOOLEAN
|
||||
StartWithReturn(
|
||||
__in LARGE_INTEGER DueTime,
|
||||
__in ULONG TolerableDelay = 0
|
||||
);
|
||||
|
||||
_Must_inspect_result_
|
||||
__inline
|
||||
BOOLEAN
|
||||
Stop(
|
||||
VOID
|
||||
);
|
||||
|
||||
__inline
|
||||
VOID
|
||||
FlushQueuedDpcs(
|
||||
VOID
|
||||
);
|
||||
};
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue