- Fix initialization order.

svn path=/trunk/; revision=10246
This commit is contained in:
Filip Navara 2004-07-22 02:36:43 +00:00
parent c846dde012
commit 58adcd8099

View file

@ -1137,6 +1137,11 @@ NTSTATUS NTAPI DriverEntry(PDRIVER_OBJECT DriverObject,
*/ */
KeInitializeSemaphore(&QueueSemaphore, 0, 0x7fffffff); KeInitializeSemaphore(&QueueSemaphore, 0, 0x7fffffff);
/*
* Event to terminate that thread
*/
KeInitializeEvent(&QueueThreadTerminate, NotificationEvent, FALSE);
/* /*
* Create the queue processing thread. Save its handle in the global variable * Create the queue processing thread. Save its handle in the global variable
* ThreadHandle so we can wait on its termination during Unload. * ThreadHandle so we can wait on its termination during Unload.
@ -1160,11 +1165,6 @@ NTSTATUS NTAPI DriverEntry(PDRIVER_OBJECT DriverObject,
*/ */
ZwClose(ThreadHandle); ZwClose(ThreadHandle);
/*
* Event to terminate that thread
*/
KeInitializeEvent(&QueueThreadTerminate, NotificationEvent, FALSE);
/* /*
* Start the device discovery proces. Returns STATUS_SUCCESS if * Start the device discovery proces. Returns STATUS_SUCCESS if
* it finds even one drive attached to one controller. * it finds even one drive attached to one controller.