Commit a02d35d3 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

msvcrt: Force debug info in critical sections.

parent bca70386
......@@ -1637,7 +1637,7 @@ static ThreadScheduler* ThreadScheduler_ctor(ThreadScheduler *this,
this->shutdown_count = this->shutdown_size = 0;
this->shutdown_events = NULL;
InitializeCriticalSection(&this->cs);
InitializeCriticalSectionEx(&this->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
this->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": ThreadScheduler");
list_init(&this->scheduled_chores);
......@@ -3525,7 +3525,7 @@ _ReentrantBlockingLock* __thiscall _ReentrantBlockingLock_ctor(_ReentrantBlockin
{
TRACE("(%p)\n", this);
InitializeCriticalSection(&this->cs);
InitializeCriticalSectionEx(&this->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
this->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": _ReentrantBlockingLock");
return this;
}
......
......@@ -606,7 +606,7 @@ static FILE* msvcrt_alloc_fp(void)
{
if (file<MSVCRT__iob || file>=MSVCRT__iob+_IOB_ENTRIES)
{
InitializeCriticalSection(&((file_crit*)file)->crit);
InitializeCriticalSectionEx(&((file_crit*)file)->crit, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
((file_crit*)file)->crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": file_crit.crit");
}
MSVCRT_stream_idx++;
......
......@@ -44,7 +44,7 @@ static inline void msvcrt_mlock_set_entry_initialized( int locknum, BOOL initial
static inline void msvcrt_initialize_mlock( int locknum )
{
InitializeCriticalSection( &(lock_table[ locknum ].crit) );
InitializeCriticalSectionEx( &(lock_table[ locknum ].crit), 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO );
lock_table[ locknum ].crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": LOCKTABLEENTRY.crit");
msvcrt_mlock_set_entry_initialized( locknum, TRUE );
}
......
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