diff options
| author | karlf <[email protected]> | 2016-08-11 13:28:13 -0700 |
|---|---|---|
| committer | karlf <[email protected]> | 2016-08-11 13:28:13 -0700 |
| commit | 96eb96dfb613e4c745db6bd1f53a92fe7e2290fc (patch) | |
| tree | ad5f3ede5cbcd6b598677ce41bcf8318471bdd92 /AVStream/avscamera/sys/Waitable.cpp | |
| parent | 687b274aa38fd05c8c26e3068932121876d7f745 (diff) | |
Updated for "Windows 10 Anniversary Update" (Version 1607)
Diffstat (limited to 'AVStream/avscamera/sys/Waitable.cpp')
| -rw-r--r-- | AVStream/avscamera/sys/Waitable.cpp | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/AVStream/avscamera/sys/Waitable.cpp b/AVStream/avscamera/sys/Waitable.cpp new file mode 100644 index 00000000..1de5827a --- /dev/null +++ b/AVStream/avscamera/sys/Waitable.cpp @@ -0,0 +1,69 @@ +/************************************************************************** + + A/V Stream Camera Sample + + Copyright (c) 2014, Microsoft Corporation. + + File: + + waitable.cpp + + Abstract: + + Base interface for any object that is waitable. + In otherwords, it contains a kernel dispatch object. + + History: + + created 5/30/2014 + +**************************************************************************/ + +#include "Common.h" + +KWaitable:: +KWaitable() +{} + + +KWaitable:: +~KWaitable() +{} + +NTSTATUS +KWaitable:: +Wait( + _In_opt_ PLARGE_INTEGER Timeout +) +/*++ + +Routine Description: + + Default Wait implementation. + +Arguments: + + Timeout - + An optional timeout value in 100ns units. Negative is relative time. + If NULL, wait forever. + +Return Value: + + Success / Failure. + +--*/ +{ + PVOID pObj = GetDispatchObject() ; + + if(pObj != NULL) + { + return + KeWaitForSingleObject( + pObj, + Executive, + KernelMode, + FALSE, + Timeout); + } + return STATUS_SUCCESS; +} |
