summaryrefslogtreecommitdiff
path: root/general/echo/umdf2/driver/AutoSync/queue.c
diff options
context:
space:
mode:
authorLuke <[email protected]>2017-11-28 00:22:11 -0800
committerGitHub <[email protected]>2017-11-28 00:22:11 -0800
commit79bbbca2f6e37d94fbbbd60d12c5c1e7dde650da (patch)
tree793ff943b8b641f95d05401156badd42da4a0f12 /general/echo/umdf2/driver/AutoSync/queue.c
parented1df9a8b80b154b71b79635e40af75f4f19001c (diff)
parent2817004092cee784d4aaf36c045fdb5b0bc09f7e (diff)
Merge pull request #1 from Microsoft/master
Updating Local
Diffstat (limited to 'general/echo/umdf2/driver/AutoSync/queue.c')
-rw-r--r--general/echo/umdf2/driver/AutoSync/queue.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/general/echo/umdf2/driver/AutoSync/queue.c b/general/echo/umdf2/driver/AutoSync/queue.c
index 3162a683..98860df6 100644
--- a/general/echo/umdf2/driver/AutoSync/queue.c
+++ b/general/echo/umdf2/driver/AutoSync/queue.c
@@ -79,7 +79,7 @@ Return Value:
// with the same lock.
//
queueAttributes.SynchronizationScope = WdfSynchronizationScopeQueue;
-
+
queueAttributes.EvtDestroyCallback = EchoEvtIoQueueContextDestroy;
status = WdfIoQueueCreate(
@@ -145,21 +145,18 @@ Return Value:
WDF_OBJECT_ATTRIBUTES timerAttributes;
//
- // Create a WDFTIMER object
+ // Create a non-periodic timer since WDF does not allow periodic timer
+ // at passive level, which is the level UMDF callbacks are invoked at.
+ // The workaround is to always restart the timer in the timer callback.
+ //
+ // WDF_TIMER_CONFIG_INIT sets AutomaticSerialization to TRUE by default.
//
WDF_TIMER_CONFIG_INIT(&timerConfig, EchoEvtTimerFunc);
- //
- // WDF_OBJECT_ATTRIBUTES_INIT sets AutomaticSerialization to TRUE by default
- //
WDF_OBJECT_ATTRIBUTES_INIT(&timerAttributes);
timerAttributes.ParentObject = Queue; // Synchronize with the I/O Queue
- timerAttributes.ExecutionLevel = WdfExecutionLevelPassive;
+ timerAttributes.ExecutionLevel = WdfExecutionLevelPassive;
- //
- // Create a non-periodic timer since WDF does not allow periodic timer
- // with autosynchronization at passive level
- //
Status = WdfTimerCreate(&timerConfig,
&timerAttributes,
Timer // Output handle
@@ -530,7 +527,7 @@ Return Value:
}
//
- // Restart the Timer since WDF does not allow periodic timer
+ // Restart the Timer since WDF does not allow periodic timer
// with autosynchronization at passive level
//
WdfTimerStart(Timer, WDF_REL_TIMEOUT_IN_MS(TIMER_PERIOD));