mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 00:45:24 +00:00
[RTL]
- Implement RtlIsCriticalSectionLocked and RtlIsCriticalSectionLockedByThread CORE-13436 #resolve svn path=/trunk/; revision=75043
This commit is contained in:
parent
248545d219
commit
907d0d20e8
3 changed files with 31 additions and 2 deletions
|
@ -736,8 +736,8 @@
|
|||
732 stdcall RtlIpv6StringToAddressExW(wstr ptr ptr ptr)
|
||||
733 stdcall RtlIpv6StringToAddressW(wstr ptr ptr)
|
||||
734 stdcall RtlIsActivationContextActive(ptr)
|
||||
# stdcall RtlIsCriticalSectionLocked
|
||||
# stdcall RtlIsCriticalSectionLockedByThread
|
||||
735 stdcall RtlIsCriticalSectionLocked(ptr)
|
||||
736 stdcall RtlIsCriticalSectionLockedByThread(ptr)
|
||||
737 stdcall RtlIsDosDeviceName_U(wstr)
|
||||
738 stdcall RtlIsGenericTableEmpty(ptr)
|
||||
739 stdcall RtlIsGenericTableEmptyAvl(ptr)
|
||||
|
|
|
@ -3025,6 +3025,20 @@ RtlInitializeCriticalSectionAndSpinCount(
|
|||
_In_ ULONG SpinCount
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
ULONG
|
||||
NTAPI
|
||||
RtlIsCriticalSectionLocked(
|
||||
_In_ PRTL_CRITICAL_SECTION CriticalSection
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
ULONG
|
||||
NTAPI
|
||||
RtlIsCriticalSectionLockedByThread(
|
||||
_In_ PRTL_CRITICAL_SECTION CriticalSection
|
||||
);
|
||||
|
||||
NTSYSAPI
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
|
|
|
@ -786,4 +786,19 @@ RtlCheckForOrphanedCriticalSections(HANDLE ThreadHandle)
|
|||
UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
RtlIsCriticalSectionLocked(PRTL_CRITICAL_SECTION CriticalSection)
|
||||
{
|
||||
return CriticalSection->RecursionCount != 0;
|
||||
}
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
RtlIsCriticalSectionLockedByThread(PRTL_CRITICAL_SECTION CriticalSection)
|
||||
{
|
||||
return CriticalSection->OwningThread == NtCurrentTeb()->ClientId.UniqueThread &&
|
||||
CriticalSection->RecursionCount != 0;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
Loading…
Reference in a new issue