ntdll: Add DebugInfo to critical sections.
This commit is contained in:
parent
3b32ae2a54
commit
aaf9a151c1
|
@ -653,7 +653,11 @@ static BOOL HEAP_InitSubHeap( HEAP *heap, LPVOID address, DWORD flags,
|
||||||
heap->critSection.SpinCount = 0;
|
heap->critSection.SpinCount = 0;
|
||||||
process_heap_critsect_debug.CriticalSection = &heap->critSection;
|
process_heap_critsect_debug.CriticalSection = &heap->critSection;
|
||||||
}
|
}
|
||||||
else RtlInitializeCriticalSection( &heap->critSection );
|
else
|
||||||
|
{
|
||||||
|
RtlInitializeCriticalSection( &heap->critSection );
|
||||||
|
heap->critSection.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": HEAP.critSection");
|
||||||
|
}
|
||||||
|
|
||||||
if (flags & HEAP_SHARED)
|
if (flags & HEAP_SHARED)
|
||||||
{
|
{
|
||||||
|
@ -1128,6 +1132,7 @@ HANDLE WINAPI RtlDestroyHeap( HANDLE heap )
|
||||||
list_remove( &heapPtr->entry );
|
list_remove( &heapPtr->entry );
|
||||||
RtlLeaveCriticalSection( &processHeap->critSection );
|
RtlLeaveCriticalSection( &processHeap->critSection );
|
||||||
|
|
||||||
|
heapPtr->critSection.DebugInfo->Spare[0] = 0;
|
||||||
RtlDeleteCriticalSection( &heapPtr->critSection );
|
RtlDeleteCriticalSection( &heapPtr->critSection );
|
||||||
subheap = &heapPtr->subheap;
|
subheap = &heapPtr->subheap;
|
||||||
while (subheap)
|
while (subheap)
|
||||||
|
|
|
@ -118,6 +118,7 @@ void WINAPI RtlInitializeResource(LPRTL_RWLOCK rwl)
|
||||||
rwl->hOwningThreadId = 0;
|
rwl->hOwningThreadId = 0;
|
||||||
rwl->dwTimeoutBoost = 0; /* no info on this one, default value is 0 */
|
rwl->dwTimeoutBoost = 0; /* no info on this one, default value is 0 */
|
||||||
RtlInitializeCriticalSection( &rwl->rtlCS );
|
RtlInitializeCriticalSection( &rwl->rtlCS );
|
||||||
|
rwl->rtlCS.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": RTL_RWLOCK.rtlCS");
|
||||||
NtCreateSemaphore( &rwl->hExclusiveReleaseSemaphore, SEMAPHORE_ALL_ACCESS, NULL, 0, 65535 );
|
NtCreateSemaphore( &rwl->hExclusiveReleaseSemaphore, SEMAPHORE_ALL_ACCESS, NULL, 0, 65535 );
|
||||||
NtCreateSemaphore( &rwl->hSharedReleaseSemaphore, SEMAPHORE_ALL_ACCESS, NULL, 0, 65535 );
|
NtCreateSemaphore( &rwl->hSharedReleaseSemaphore, SEMAPHORE_ALL_ACCESS, NULL, 0, 65535 );
|
||||||
}
|
}
|
||||||
|
@ -140,6 +141,7 @@ void WINAPI RtlDeleteResource(LPRTL_RWLOCK rwl)
|
||||||
NtClose( rwl->hExclusiveReleaseSemaphore );
|
NtClose( rwl->hExclusiveReleaseSemaphore );
|
||||||
NtClose( rwl->hSharedReleaseSemaphore );
|
NtClose( rwl->hSharedReleaseSemaphore );
|
||||||
RtlLeaveCriticalSection( &rwl->rtlCS );
|
RtlLeaveCriticalSection( &rwl->rtlCS );
|
||||||
|
rwl->rtlCS.DebugInfo->Spare[0] = 0;
|
||||||
RtlDeleteCriticalSection( &rwl->rtlCS );
|
RtlDeleteCriticalSection( &rwl->rtlCS );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue