Module: wine Branch: master Commit: 139d624787a2c629cf640a413c4faabfc2bf40b4 URL: https://gitlab.winehq.org/wine/wine/-/commit/139d624787a2c629cf640a413c4faab...
Author: Paul Gofman pgofman@codeweavers.com Date: Thu Feb 15 15:01:47 2024 -0600
rpcrt4: Force debug info in critical sections.
---
dlls/rpcrt4/rpc_assoc.c | 4 ++-- dlls/rpcrt4/rpc_server.c | 2 +- dlls/rpcrt4/rpc_transport.c | 2 +- dlls/rpcrt4/rpcrt4_main.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/rpcrt4/rpc_assoc.c b/dlls/rpcrt4/rpc_assoc.c index 6a6768e1677..c3eec9558dd 100644 --- a/dlls/rpcrt4/rpc_assoc.c +++ b/dlls/rpcrt4/rpc_assoc.c @@ -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;
diff --git a/dlls/rpcrt4/rpc_server.c b/dlls/rpcrt4/rpc_server.c index 41431ebca02..eb733f69980 100644 --- a/dlls/rpcrt4/rpc_server.c +++ b/dlls/rpcrt4/rpc_server.c @@ -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); diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c index 62bbd9f2939..8d53e7cee35 100644 --- a/dlls/rpcrt4/rpc_transport.c +++ b/dlls/rpcrt4/rpc_transport.c @@ -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; } diff --git a/dlls/rpcrt4/rpcrt4_main.c b/dlls/rpcrt4/rpcrt4_main.c index 122ab94f17c..37d82f330dc 100644 --- a/dlls/rpcrt4/rpcrt4_main.c +++ b/dlls/rpcrt4/rpcrt4_main.c @@ -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();