Commit ab22796a authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

ntoskrnl.exe: Implement ExIsResourceAcquiredSharedLite().

parent 37640f32
...@@ -166,7 +166,7 @@ ...@@ -166,7 +166,7 @@
@ stdcall ExInterlockedRemoveHeadList(ptr ptr) @ stdcall ExInterlockedRemoveHeadList(ptr ptr)
@ stub ExIsProcessorFeaturePresent @ stub ExIsProcessorFeaturePresent
@ stdcall ExIsResourceAcquiredExclusiveLite(ptr) @ stdcall ExIsResourceAcquiredExclusiveLite(ptr)
@ stub ExIsResourceAcquiredSharedLite @ stdcall ExIsResourceAcquiredSharedLite(ptr)
@ stdcall ExLocalTimeToSystemTime(ptr ptr) RtlLocalTimeToSystemTime @ stdcall ExLocalTimeToSystemTime(ptr ptr) RtlLocalTimeToSystemTime
@ stub ExNotifyCallback @ stub ExNotifyCallback
@ stub ExQueryPoolBlockSize @ stub ExQueryPoolBlockSize
......
...@@ -1144,3 +1144,28 @@ BOOLEAN WINAPI ExIsResourceAcquiredExclusiveLite( ERESOURCE *resource ) ...@@ -1144,3 +1144,28 @@ BOOLEAN WINAPI ExIsResourceAcquiredExclusiveLite( ERESOURCE *resource )
return ret; return ret;
} }
/***********************************************************************
* ExIsResourceAcquiredSharedLite (NTOSKRNL.EXE.@)
*/
ULONG WINAPI ExIsResourceAcquiredSharedLite( ERESOURCE *resource )
{
ULONG ret;
KIRQL irql;
TRACE("resource %p.\n", resource);
KeAcquireSpinLock( &resource->SpinLock, &irql );
if (resource->OwnerEntry.OwnerThread == (ERESOURCE_THREAD)KeGetCurrentThread())
ret = resource->ActiveEntries;
else
{
OWNER_ENTRY *entry = resource_get_shared_entry( resource, (ERESOURCE_THREAD)KeGetCurrentThread() );
ret = entry->OwnerCount;
}
KeReleaseSpinLock( &resource->SpinLock, irql );
return ret;
}
...@@ -1532,6 +1532,7 @@ PSLIST_ENTRY WINAPI ExInterlockedPopEntrySList(PSLIST_HEADER,PKSPIN_LOCK); ...@@ -1532,6 +1532,7 @@ PSLIST_ENTRY WINAPI ExInterlockedPopEntrySList(PSLIST_HEADER,PKSPIN_LOCK);
PSLIST_ENTRY WINAPI ExInterlockedPushEntrySList(PSLIST_HEADER,PSLIST_ENTRY,PKSPIN_LOCK); PSLIST_ENTRY WINAPI ExInterlockedPushEntrySList(PSLIST_HEADER,PSLIST_ENTRY,PKSPIN_LOCK);
LIST_ENTRY * WINAPI ExInterlockedRemoveHeadList(LIST_ENTRY*,KSPIN_LOCK*); LIST_ENTRY * WINAPI ExInterlockedRemoveHeadList(LIST_ENTRY*,KSPIN_LOCK*);
BOOLEAN WINAPI ExIsResourceAcquiredExclusiveLite(ERESOURCE*); BOOLEAN WINAPI ExIsResourceAcquiredExclusiveLite(ERESOURCE*);
ULONG WINAPI ExIsResourceAcquiredSharedLite(ERESOURCE*);
void WINAPI ExReleaseFastMutexUnsafe(PFAST_MUTEX); void WINAPI ExReleaseFastMutexUnsafe(PFAST_MUTEX);
void WINAPI ExReleaseResourceForThreadLite(ERESOURCE*,ERESOURCE_THREAD); void WINAPI ExReleaseResourceForThreadLite(ERESOURCE*,ERESOURCE_THREAD);
ULONG WINAPI ExSetTimerResolution(ULONG,BOOLEAN); ULONG WINAPI ExSetTimerResolution(ULONG,BOOLEAN);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment