ntdll: Add DebugInfo to critical sections.
Jan Zerebecki
jan.wine at zerebecki.de
Sat Mar 10 15:09:39 CST 2007
---
If this patch is rejected from inclusion, please tell me why, as
I would have to ask anyway.
dlls/ntdll/heap.c | 7 ++++++-
dlls/ntdll/rtl.c | 2 ++
2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c
index b758223..a98d601 100644
--- a/dlls/ntdll/heap.c
+++ b/dlls/ntdll/heap.c
@@ -656,7 +656,11 @@ static BOOL HEAP_InitSubHeap( HEAP *heap, LPVOID address, DWORD flags,
heap->critSection.SpinCount = 0;
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)
{
@@ -1131,6 +1135,7 @@ HANDLE WINAPI RtlDestroyHeap( HANDLE heap )
list_remove( &heapPtr->entry );
RtlLeaveCriticalSection( &processHeap->critSection );
+ heapPtr->critSection.DebugInfo->Spare[0] = 0;
RtlDeleteCriticalSection( &heapPtr->critSection );
subheap = &heapPtr->subheap;
while (subheap)
diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c
index 7dd4003..3bc0848 100644
--- a/dlls/ntdll/rtl.c
+++ b/dlls/ntdll/rtl.c
@@ -118,6 +118,7 @@ void WINAPI RtlInitializeResource(LPRTL_RWLOCK rwl)
rwl->hOwningThreadId = 0;
rwl->dwTimeoutBoost = 0; /* no info on this one, default value is 0 */
RtlInitializeCriticalSection( &rwl->rtlCS );
+ rwl->rtlCS.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": LPRTL_RWLOCK->rtlCS");
NtCreateSemaphore( &rwl->hExclusiveReleaseSemaphore, 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->hSharedReleaseSemaphore );
RtlLeaveCriticalSection( &rwl->rtlCS );
+ rwl->rtlCS.DebugInfo->Spare[0] = 0;
RtlDeleteCriticalSection( &rwl->rtlCS );
}
}
More information about the wine-patches
mailing list