Commit 139d6247 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

rpcrt4: Force debug info in critical sections.

parent 67bea281
......@@ -72,7 +72,7 @@ static RPC_STATUS RpcAssoc_Alloc(LPCSTR Protseq, LPCSTR NetworkAddr,
assoc->refs = 1;
list_init(&assoc->free_connection_pool);
list_init(&assoc->context_handle_list);
InitializeCriticalSection(&assoc->cs);
InitializeCriticalSectionEx(&assoc->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
assoc->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": RpcAssoc.cs");
assoc->Protseq = strdup(Protseq);
assoc->NetworkAddr = strdup(NetworkAddr);
......@@ -463,7 +463,7 @@ RPC_STATUS RpcServerAssoc_AllocateContextHandle(RpcAssoc *assoc, void *CtxGuard,
return RPC_S_OUT_OF_MEMORY;
context_handle->ctx_guard = CtxGuard;
InitializeCriticalSection(&context_handle->lock);
InitializeCriticalSectionEx(&context_handle->lock, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
context_handle->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": RpcContextHandle.lock");
context_handle->refs = 1;
......
......@@ -965,7 +965,7 @@ static RPC_STATUS alloc_serverprotoseq(UINT MaxCalls, const char *Protseq, RpcSe
(*ps)->ops = ops;
list_init(&(*ps)->listeners);
list_init(&(*ps)->connections);
InitializeCriticalSection(&(*ps)->cs);
InitializeCriticalSectionEx(&(*ps)->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
(*ps)->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": RpcServerProtseq.cs");
list_add_head(&protseqs, &(*ps)->entry);
......
......@@ -1756,7 +1756,7 @@ static RpcConnection *rpcrt4_ncacn_http_alloc(void)
httpc->cancel_event = CreateEventW(NULL, FALSE, FALSE, NULL);
httpc->async_data->refs = 1;
httpc->async_data->inet_buffers.dwStructSize = sizeof(INTERNET_BUFFERSW);
InitializeCriticalSection(&httpc->async_data->cs);
InitializeCriticalSectionEx(&httpc->async_data->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
httpc->async_data->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": RpcHttpAsyncData.cs");
return &httpc->common;
}
......
......@@ -950,7 +950,7 @@ static struct threaddata *get_or_create_threaddata(void)
tdata = calloc(1, sizeof(*tdata));
if (!tdata) return NULL;
InitializeCriticalSection(&tdata->cs);
InitializeCriticalSectionEx(&tdata->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
tdata->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": threaddata.cs");
tdata->thread_id = GetCurrentThreadId();
......
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