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

netapi32: Force debug info in critical sections.

parent a02d35d3
......@@ -61,7 +61,7 @@ struct NBCmdQueue *NBCmdQueueCreate(HANDLE heap)
if (queue)
{
queue->heap = heap;
InitializeCriticalSection(&queue->cs);
InitializeCriticalSectionEx(&queue->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
queue->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": NBCmdQueue.cs");
queue->head = NULL;
}
......
......@@ -100,7 +100,7 @@ struct NBNameCache *NBNameCacheCreate(HANDLE heap, DWORD entryExpireTimeMS)
if (cache)
{
cache->heap = heap;
InitializeCriticalSection(&cache->cs);
InitializeCriticalSectionEx(&cache->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
cache->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": NBNameCache.cs");
cache->entryExpireTimeMS = entryExpireTimeMS;
cache->head = NULL;
......
......@@ -1036,7 +1036,7 @@ static UCHAR NetBTCall(void *adapt, PNCB ncb, void **sess)
if (session)
{
session->fd = fd;
InitializeCriticalSection(&session->cs);
InitializeCriticalSectionEx(&session->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
session->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": NetBTSession.cs");
*sess = session;
}
......
......@@ -103,7 +103,7 @@ static UCHAR nbResizeAdapterTable(UCHAR newSize)
void NetBIOSInit(void)
{
memset(&gNBTable, 0, sizeof(gNBTable));
InitializeCriticalSection(&gNBTable.cs);
InitializeCriticalSectionEx(&gNBTable.cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
gNBTable.cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": NetBIOSAdapterTable.cs");
}
......@@ -211,7 +211,7 @@ BOOL NetBIOSRegisterAdapter(ULONG transport, DWORD ifIndex, void *data)
gNBTable.table[i].impl.ifIndex = ifIndex;
gNBTable.table[i].impl.data = data;
gNBTable.table[i].cmdQueue = NBCmdQueueCreate(GetProcessHeap());
InitializeCriticalSection(&gNBTable.table[i].cs);
InitializeCriticalSectionEx(&gNBTable.table[i].cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
gNBTable.table[i].cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": NetBIOSAdapterTable.NetBIOSAdapter.cs");
gNBTable.table[i].enabled = TRUE;
ret = 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