From 0ee017f2ed74690ef47567de8c5394a0a837a5ed Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 2 May 2019 13:21:48 +0200 Subject: [PATCH] ntoskrnl.exe: Support UserEvent in IoCompleteRequest. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/ntoskrnl.exe/ntoskrnl.c | 1 + dlls/ntoskrnl.exe/tests/driver.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index c4c3bab1f12..b4afc1ff1db 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -2304,6 +2304,7 @@ VOID WINAPI IoCompleteRequest( IRP *irp, UCHAR priority_boost ) if (irp->Flags & IRP_DEALLOCATE_BUFFER) HeapFree( GetProcessHeap(), 0, irp->AssociatedIrp.SystemBuffer ); + if (irp->UserEvent) KeSetEvent( irp->UserEvent, IO_NO_INCREMENT, FALSE ); IoFreeIrp( irp ); } diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c index 9ad2bb97a37..35a86bb720a 100644 --- a/dlls/ntoskrnl.exe/tests/driver.c +++ b/dlls/ntoskrnl.exe/tests/driver.c @@ -752,7 +752,6 @@ static void test_call_driver(DEVICE_OBJECT *device) IoCompleteRequest(irp, IO_NO_INCREMENT); status = wait_single(&event, 0); - todo_wine ok(status == STATUS_SUCCESS, "got %#x\n", status); }