Lost wake problem!

Hi all;
I need to wait till all work q itmes queued by our driver are drained.
Below code runs at PASSIVE level.

“pVFVolumeInformation->PendingWorkQItems” are the number of unprocessed
workq items.
“pVFVolumeInformation->AllWorkQItemsProcessed” is the event that is
signalled when all the work q items have been processed.

//–> There is a lost wake problem here
if
(InterlockedOr(&pVFVolumeInformation->PendingWorkQItems,&(long)(0))) {
/* Wait for any async WorkQItems needing time to be logged
*/

KeWaitForSingleObject(&pVFVolumeInformation->AllWorkQItemsProcessed,Executive,KernelMode,FALSE,NULL);
}
//–>
I see a lost wake in the Check being made and Wait Activity.
Can this be solved by any construct that has check and sleep done
atomically.

I cannot afford to have synchronization primitive around the code. As some
other parts of code that queue workitems would get some performance hit. It
can be done as a last resort :).

Regards
Faraz.