Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/ntoskrnl.exe/ntoskrnl.c | 13 ------------- dlls/ntoskrnl.exe/sync.c | 15 +++++++++++++++ include/ddk/wdm.h | 1 + 3 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c index 09fb6605bc..6ce262c96c 100644 --- a/dlls/ntoskrnl.exe/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/ntoskrnl.c @@ -3178,19 +3178,6 @@ BOOLEAN WINAPI IoSetThreadHardErrorMode(BOOLEAN EnableHardErrors) return FALSE; }
-/***************************************************** - * IoAcquireRemoveLockEx (NTOSKRNL.EXE.@) - */ - -NTSTATUS WINAPI IoAcquireRemoveLockEx(PIO_REMOVE_LOCK lock, PVOID tag, - LPCSTR file, ULONG line, ULONG lock_size) -{ - FIXME("(%p, %p, %s, %u, %u): stub\n", lock, tag, debugstr_a(file), line, lock_size); - - return STATUS_NOT_IMPLEMENTED; -} - - /***************************************************** * DllMain */ diff --git a/dlls/ntoskrnl.exe/sync.c b/dlls/ntoskrnl.exe/sync.c index 0b2ca6f6b7..f54fe2a663 100644 --- a/dlls/ntoskrnl.exe/sync.c +++ b/dlls/ntoskrnl.exe/sync.c @@ -1209,3 +1209,18 @@ void WINAPI IoInitializeRemoveLockEx( IO_REMOVE_LOCK *lock, ULONG tag, lock->Common.Removed = FALSE; lock->Common.IoCount = 0; } + +/*********************************************************************** + * IoAcquireRemoveLockEx (NTOSKRNL.EXE.@) + */ +NTSTATUS WINAPI IoAcquireRemoveLockEx( IO_REMOVE_LOCK *lock, void *tag, + const char *file, ULONG line, ULONG size ) +{ + TRACE("lock %p, tag %p, file %s, line %u, size %u.\n", lock, tag, debugstr_a(file), line, size); + + if (lock->Common.Removed) + return STATUS_DELETE_PENDING; + + InterlockedIncrement( &lock->Common.IoCount ); + return STATUS_SUCCESS; +} diff --git a/include/ddk/wdm.h b/include/ddk/wdm.h index b7a05034b8..73ead8adc6 100644 --- a/include/ddk/wdm.h +++ b/include/ddk/wdm.h @@ -1565,6 +1565,7 @@ void WINAPI ExReleaseResourceForThreadLite(ERESOURCE*,ERESOURCE_THREAD); ULONG WINAPI ExSetTimerResolution(ULONG,BOOLEAN);
void WINAPI IoAcquireCancelSpinLock(KIRQL*); +NTSTATUS WINAPI IoAcquireRemoveLockEx(IO_REMOVE_LOCK*,void*,const char*,ULONG, ULONG); NTSTATUS WINAPI IoAllocateDriverObjectExtension(PDRIVER_OBJECT,PVOID,ULONG,PVOID*); PVOID WINAPI IoAllocateErrorLogEntry(PVOID,UCHAR); PIRP WINAPI IoAllocateIrp(CCHAR,BOOLEAN);