Module: wine Branch: master Commit: 27e70ba8ecf3eeb4d048fc01b3380a0dda0168d1 URL: https://gitlab.winehq.org/wine/wine/-/commit/27e70ba8ecf3eeb4d048fc01b3380a0...
Author: Paul Gofman pgofman@codeweavers.com Date: Wed Feb 21 21:52:54 2024 -0600
ntdll: Force debug info in critical sections.
---
dlls/ntdll/heap.c | 2 +- dlls/ntdll/rtl.c | 2 +- dlls/ntdll/threadpool.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c index ec4e376bd4b..7764b9f0e71 100644 --- a/dlls/ntdll/heap.c +++ b/dlls/ntdll/heap.c @@ -1548,7 +1548,7 @@ HANDLE WINAPI RtlCreateHeap( ULONG flags, void *addr, SIZE_T total_size, SIZE_T } else { - RtlInitializeCriticalSection( &heap->cs ); + RtlInitializeCriticalSectionEx( &heap->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO ); heap->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": heap.cs"); }
diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c index a077108b8d0..3d482ec2f92 100644 --- a/dlls/ntdll/rtl.c +++ b/dlls/ntdll/rtl.c @@ -120,7 +120,7 @@ void WINAPI RtlInitializeResource(LPRTL_RWLOCK rwl) rwl->uSharedWaiters = 0; rwl->hOwningThreadId = 0; rwl->dwTimeoutBoost = 0; /* no info on this one, default value is 0 */ - RtlInitializeCriticalSection( &rwl->rtlCS ); + RtlInitializeCriticalSectionEx( &rwl->rtlCS, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO ); rwl->rtlCS.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": RTL_RWLOCK.rtlCS"); NtCreateSemaphore( &rwl->hExclusiveReleaseSemaphore, SEMAPHORE_ALL_ACCESS, NULL, 0, 65535 ); NtCreateSemaphore( &rwl->hSharedReleaseSemaphore, SEMAPHORE_ALL_ACCESS, NULL, 0, 65535 ); diff --git a/dlls/ntdll/threadpool.c b/dlls/ntdll/threadpool.c index 4f22114a55e..c6e40fc78f4 100644 --- a/dlls/ntdll/threadpool.c +++ b/dlls/ntdll/threadpool.c @@ -1675,7 +1675,7 @@ static NTSTATUS tp_threadpool_alloc( struct threadpool **out ) pool->objcount = 0; pool->shutdown = FALSE;
- RtlInitializeCriticalSection( &pool->cs ); + RtlInitializeCriticalSectionEx( &pool->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO ); pool->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": threadpool.cs");
for (i = 0; i < ARRAY_SIZE(pool->pools); ++i) @@ -1839,7 +1839,7 @@ static NTSTATUS tp_group_alloc( struct threadpool_group **out ) group->refcount = 1; group->shutdown = FALSE;
- RtlInitializeCriticalSection( &group->cs ); + RtlInitializeCriticalSectionEx( &group->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO ); group->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": threadpool_group.cs");
list_init( &group->members );