Use a more portable scheme for storing the name of a critical

section.
This commit is contained in:
Alexandre Julliard 2005-09-09 10:19:44 +00:00
parent 5cd9c3f625
commit 20a1a203c6
59 changed files with 79 additions and 81 deletions

View File

@ -75,7 +75,7 @@ static CRITICAL_SECTION_DEBUG service_cs_debug =
0, 0, &service_cs,
{ &service_cs_debug.ProcessLocksList,
&service_cs_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": service_cs") }
0, 0, { (DWORD_PTR)(__FILE__ ": service_cs") }
};
static CRITICAL_SECTION service_cs = { &service_cs_debug, -1, 0, 0, 0, 0 };

View File

@ -552,7 +552,7 @@ static HRESULT alloc_device(REFGUID rguid, const void *jvt, IDirectInputImpl *di
IDirectInputDevice_AddRef((LPDIRECTINPUTDEVICE8A)newDevice->dinput);
InitializeCriticalSection(&(newDevice->crit));
newDevice->crit.DebugInfo->Spare[1] = (DWORD)"DINPUT_Mouse";
newDevice->crit.DebugInfo->Spare[0] = (DWORD_PTR)"DINPUT_Mouse";
newDevice->devcaps.dwSize = sizeof(newDevice->devcaps);
newDevice->devcaps.dwFlags = DIDC_ATTACHED;
@ -688,7 +688,7 @@ static ULONG WINAPI JoystickAImpl_Release(LPDIRECTINPUTDEVICE8A iface)
/* release the data transform filter */
release_DataFormat(This->transform);
This->crit.DebugInfo->Spare[1] = 0;
This->crit.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&(This->crit));
IDirectInputDevice_Release((LPDIRECTINPUTDEVICE8A)This->dinput);

View File

@ -83,7 +83,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &keyboard_crit,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": keyboard_crit") }
0, 0, { (DWORD_PTR)(__FILE__ ": keyboard_crit") }
};
static CRITICAL_SECTION keyboard_crit = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -365,7 +365,7 @@ static ULONG WINAPI IDirectSoundBufferImpl_Release(LPDIRECTSOUNDBUFFER8 iface)
if (!ref) {
DSOUND_RemoveBuffer(This->dsound, This);
This->lock.DebugInfo->Spare[1] = 0;
This->lock.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&(This->lock));
if (This->hwbuf) {
@ -1152,7 +1152,7 @@ HRESULT WINAPI IDirectSoundBufferImpl_Create(
DSOUND_RecalcVolPan(&(dsb->volpan));
InitializeCriticalSection(&(dsb->lock));
dsb->lock.DebugInfo->Spare[1] = (DWORD)"DSOUNDBUFFER_lock";
dsb->lock.DebugInfo->Spare[0] = (DWORD_PTR)"DSOUNDBUFFER_lock";
/* register buffer if not primary */
if (!(dsbd->dwFlags & DSBCAPS_PRIMARYBUFFER)) {
@ -1160,7 +1160,7 @@ HRESULT WINAPI IDirectSoundBufferImpl_Create(
if (err != DS_OK) {
HeapFree(GetProcessHeap(),0,dsb->buffer->memory);
HeapFree(GetProcessHeap(),0,dsb->buffer);
dsb->lock.DebugInfo->Spare[1] = 0;
dsb->lock.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&(dsb->lock));
HeapFree(GetProcessHeap(),0,dsb->pwfx);
HeapFree(GetProcessHeap(),0,dsb);

View File

@ -266,7 +266,7 @@ static HRESULT DirectSoundCaptureDevice_Create(
device->state = STATE_STOPPED;
InitializeCriticalSection( &(device->lock) );
device->lock.DebugInfo->Spare[1] = (DWORD)"DSCAPTURE_lock";
device->lock.DebugInfo->Spare[0] = (DWORD_PTR)"DSCAPTURE_lock";
*ppDevice = device;
@ -509,7 +509,7 @@ static ULONG DirectSoundCaptureDevice_Release(
}
HeapFree(GetProcessHeap(), 0, device->pwfx);
device->lock.DebugInfo->Spare[1] = 0;
device->lock.DebugInfo->Spare[0] = 0;
DeleteCriticalSection( &(device->lock) );
DSOUND_capture[device->drvdesc.dnDevNode] = NULL;
HeapFree(GetProcessHeap(), 0, device);

View File

@ -545,13 +545,13 @@ static HRESULT WINAPI IDirectSoundImpl_DuplicateSoundBuffer(
CopyMemory(dsb->pwfx, pdsb->pwfx, size);
InitializeCriticalSection(&(dsb->lock));
dsb->lock.DebugInfo->Spare[1] = (DWORD)"DSOUNDBUFFER_lock";
dsb->lock.DebugInfo->Spare[0] = (DWORD_PTR)"DSOUNDBUFFER_lock";
/* register buffer */
hres = DSOUND_AddBuffer(This, dsb);
if (hres != DS_OK) {
IDirectSoundBuffer8_Release(psb);
dsb->lock.DebugInfo->Spare[1] = 0;
dsb->lock.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&(dsb->lock));
HeapFree(GetProcessHeap(),0,dsb->buffer);
HeapFree(GetProcessHeap(),0,dsb->pwfx);
@ -931,7 +931,7 @@ static HRESULT DirectSoundDevice_Create(DirectSoundDevice ** ppDevice)
device->pwfx->cbSize = 0;
InitializeCriticalSection(&(device->mixlock));
device->mixlock.DebugInfo->Spare[1] = (DWORD)"DSOUND_mixlock";
device->mixlock.DebugInfo->Spare[0] = (DWORD_PTR)"DSOUND_mixlock";
RtlInitializeResource(&(device->buffer_list_lock));
@ -989,7 +989,7 @@ static ULONG DirectSoundDevice_Release(DirectSoundDevice * device)
HeapFree(GetProcessHeap(),0,device->tmp_buffer);
HeapFree(GetProcessHeap(),0,device->buffer);
RtlDeleteResource(&device->buffer_list_lock);
device->mixlock.DebugInfo->Spare[1] = 0;
device->mixlock.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&device->mixlock);
HeapFree(GetProcessHeap(),0,device);
TRACE("(%p) released\n", device);

View File

@ -114,7 +114,7 @@ DirectSoundFullDuplexCreate(
This->lpVtbl = &dsfdvt;
InitializeCriticalSection( &(This->lock) );
This->lock.DebugInfo->Spare[1] = (DWORD)"DSDUPLEX_lock";
This->lock.DebugInfo->Spare[0] = (DWORD_PTR)"DSDUPLEX_lock";
hres = IDirectSoundFullDuplexImpl_Initialize( (LPDIRECTSOUNDFULLDUPLEX)This,
pcGuidCaptureDevice, pcGuidRenderDevice,
@ -161,7 +161,7 @@ IDirectSoundFullDuplexImpl_Release( LPDIRECTSOUNDFULLDUPLEX iface )
TRACE("(%p) ref was %ld\n", This, ref - 1);
if (!ref) {
This->lock.DebugInfo->Spare[1] = 0;
This->lock.DebugInfo->Spare[0] = 0;
DeleteCriticalSection( &(This->lock) );
HeapFree( GetProcessHeap(), 0, This );
TRACE("(%p) released\n", This);

View File

@ -53,7 +53,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &driver_section,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": driver_section") }
0, 0, { (DWORD_PTR)(__FILE__ ": driver_section") }
};
static CRITICAL_SECTION driver_section = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -72,7 +72,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &GDI_level.crst,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": GDI_level") }
0, 0, { (DWORD_PTR)(__FILE__ ": GDI_level") }
};
static SYSLEVEL GDI_level = { { &critsect_debug, -1, 0, 0, 0, 0 }, 3 };

View File

@ -1460,7 +1460,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &CONSOLE_CritSect,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": CONSOLE_CritSect") }
0, 0, { (DWORD_PTR)(__FILE__ ": CONSOLE_CritSect") }
};
static CRITICAL_SECTION CONSOLE_CritSect = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -57,7 +57,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &ldt_section,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": ldt_section") }
0, 0, { (DWORD_PTR)(__FILE__ ": ldt_section") }
};
static CRITICAL_SECTION ldt_section = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -88,7 +88,7 @@ static CRITICAL_SECTION_DEBUG NLS_FormatsCS_debug =
0, 0, &NLS_FormatsCS,
{ &NLS_FormatsCS_debug.ProcessLocksList,
&NLS_FormatsCS_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": NLS_Formats") }
0, 0, { (DWORD_PTR)(__FILE__ ": NLS_Formats") }
};
static CRITICAL_SECTION NLS_FormatsCS = { &NLS_FormatsCS_debug, -1, 0, 0, 0, 0 };

View File

@ -55,7 +55,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &dlldir_section,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": dlldir_section") }
0, 0, { (DWORD_PTR)(__FILE__ ": dlldir_section") }
};
static CRITICAL_SECTION dlldir_section = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -91,7 +91,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &PROFILE_CritSect,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": PROFILE_CritSect") }
0, 0, { (DWORD_PTR)(__FILE__ ": PROFILE_CritSect") }
};
static CRITICAL_SECTION PROFILE_CritSect = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -41,7 +41,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &Win16Mutex.crst,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": Win16Mutex") }
0, 0, { (DWORD_PTR)(__FILE__ ": Win16Mutex") }
};
static SYSLEVEL Win16Mutex = { { &critsect_debug, -1, 0, 0, 0, 0 }, 1 };

View File

@ -84,7 +84,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &vxd_section,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": vxd_section") }
0, 0, { (DWORD_PTR)(__FILE__ ": vxd_section") }
};
static CRITICAL_SECTION vxd_section = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -37,7 +37,7 @@ static CRITICAL_SECTION_DEBUG MSCMS_handle_cs_debug =
0, 0, &MSCMS_handle_cs,
{ &MSCMS_handle_cs_debug.ProcessLocksList,
&MSCMS_handle_cs_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": MSCMS_handle_cs") }
0, 0, { (DWORD_PTR)(__FILE__ ": MSCMS_handle_cs") }
};
static CRITICAL_SECTION MSCMS_handle_cs = { &MSCMS_handle_cs_debug, -1, 0, 0, 0, 0 };

View File

@ -37,7 +37,7 @@ static CRITICAL_SECTION_DEBUG MSI_handle_cs_debug =
0, 0, &MSI_handle_cs,
{ &MSI_handle_cs_debug.ProcessLocksList,
&MSI_handle_cs_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": MSI_handle_cs") }
0, 0, { (DWORD_PTR)(__FILE__ ": MSI_handle_cs") }
};
static CRITICAL_SECTION MSI_handle_cs = { &MSI_handle_cs_debug, -1, 0, 0, 0, 0 };
@ -47,7 +47,7 @@ static CRITICAL_SECTION_DEBUG MSI_object_cs_debug =
0, 0, &MSI_object_cs,
{ &MSI_object_cs_debug.ProcessLocksList,
&MSI_object_cs_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": MSI_object_cs") }
0, 0, { (DWORD_PTR)(__FILE__ ": MSI_object_cs") }
};
static CRITICAL_SECTION MSI_object_cs = { &MSI_object_cs_debug, -1, 0, 0, 0, 0 };

View File

@ -380,7 +380,7 @@ static RTL_CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &cache_section,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": cache_section") }
0, 0, { (DWORD_PTR)(__FILE__ ": cache_section") }
};
static RTL_CRITICAL_SECTION cache_section = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -124,8 +124,7 @@ NTSTATUS WINAPI RtlInitializeCriticalSectionAndSpinCount( RTL_CRITICAL_SECTION *
crit->DebugInfo->ProcessLocksList.Flink = &(crit->DebugInfo->ProcessLocksList);
crit->DebugInfo->EntryCount = 0;
crit->DebugInfo->ContentionCount = 0;
crit->DebugInfo->Spare[0] = 0;
crit->DebugInfo->Spare[1] = 0;
memset( crit->DebugInfo->Spare, 0, sizeof(crit->DebugInfo->Spare) );
}
crit->LockCount = -1;
crit->RecursionCount = 0;
@ -190,7 +189,7 @@ NTSTATUS WINAPI RtlDeleteCriticalSection( RTL_CRITICAL_SECTION *crit )
if (crit->DebugInfo)
{
/* only free the ones we made in here */
if (!crit->DebugInfo->Spare[1])
if (!crit->DebugInfo->Spare[0])
{
RtlFreeHeap( GetProcessHeap(), 0, crit->DebugInfo );
crit->DebugInfo = NULL;
@ -234,7 +233,7 @@ NTSTATUS WINAPI RtlpWaitForCriticalSection( RTL_CRITICAL_SECTION *crit )
if ( status == STATUS_TIMEOUT )
{
const char *name = NULL;
if (crit->DebugInfo) name = (char *)crit->DebugInfo->Spare[1];
if (crit->DebugInfo) name = (char *)crit->DebugInfo->Spare[0];
if (!name) name = "?";
ERR( "section %p %s wait timed out in thread %04lx, blocked by %04lx, retrying (60 sec)\n",
crit, debugstr_a(name), GetCurrentThreadId(), (DWORD)crit->OwningThread );
@ -251,7 +250,7 @@ NTSTATUS WINAPI RtlpWaitForCriticalSection( RTL_CRITICAL_SECTION *crit )
if (status == STATUS_WAIT_0) return STATUS_SUCCESS;
/* Throw exception only for Wine internal locks */
if ((!crit->DebugInfo) || (!crit->DebugInfo->Spare[1])) continue;
if ((!crit->DebugInfo) || (!crit->DebugInfo->Spare[0])) continue;
rec.ExceptionCode = STATUS_POSSIBLE_DEADLOCK;
rec.ExceptionFlags = 0;

View File

@ -141,7 +141,7 @@ static RTL_CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &dir_section,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": dir_section") }
0, 0, { (DWORD_PTR)(__FILE__ ": dir_section") }
};
static RTL_CRITICAL_SECTION dir_section = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -58,7 +58,7 @@ static RTL_CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &vectored_handlers_section,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": vectored_handlers_section") }
0, 0, { (DWORD_PTR)(__FILE__ ": vectored_handlers_section") }
};
static RTL_CRITICAL_SECTION vectored_handlers_section = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -188,7 +188,7 @@ static RTL_CRITICAL_SECTION_DEBUG process_heap_critsect_debug =
{
0, 0, NULL, /* will be set later */
{ &process_heap_critsect_debug.ProcessLocksList, &process_heap_critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": main process heap section") }
0, 0, { (DWORD_PTR)(__FILE__ ": main process heap section") }
};

View File

@ -101,7 +101,7 @@ static RTL_CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &loader_section,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": loader_section") }
0, 0, { (DWORD_PTR)(__FILE__ ": loader_section") }
};
static RTL_CRITICAL_SECTION loader_section = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -42,7 +42,7 @@ static RTL_CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &peb_lock,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": peb_lock") }
0, 0, { (DWORD_PTR)(__FILE__ ": peb_lock") }
};
static RTL_CRITICAL_SECTION peb_lock = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -52,7 +52,7 @@ static RTL_CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &TIME_GetBias_section,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": TIME_GetBias_section") }
0, 0, { (DWORD_PTR)(__FILE__ ": TIME_GetBias_section") }
};
static RTL_CRITICAL_SECTION TIME_GetBias_section = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -106,7 +106,7 @@ static RTL_CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &csVirtual,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": csVirtual") }
0, 0, { (DWORD_PTR)(__FILE__ ": csVirtual") }
};
static RTL_CRITICAL_SECTION csVirtual = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -97,7 +97,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &csApartment,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": csApartment") }
0, 0, { (DWORD_PTR)(__FILE__ ": csApartment") }
};
static CRITICAL_SECTION csApartment = { &critsect_debug, -1, 0, 0, 0, 0 };
@ -134,7 +134,7 @@ static CRITICAL_SECTION_DEBUG class_cs_debug =
{
0, 0, &csRegisteredClassList,
{ &class_cs_debug.ProcessLocksList, &class_cs_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": csRegisteredClassList") }
0, 0, { (DWORD_PTR)(__FILE__ ": csRegisteredClassList") }
};
static CRITICAL_SECTION csRegisteredClassList = { &class_cs_debug, -1, 0, 0, 0, 0 };
@ -161,7 +161,7 @@ static CRITICAL_SECTION_DEBUG dll_cs_debug =
{
0, 0, &csOpenDllList,
{ &dll_cs_debug.ProcessLocksList, &dll_cs_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": csOpenDllList") }
0, 0, { (DWORD_PTR)(__FILE__ ": csOpenDllList") }
};
static CRITICAL_SECTION csOpenDllList = { &dll_cs_debug, -1, 0, 0, 0, 0 };

View File

@ -256,13 +256,8 @@ static inline APARTMENT* COM_CurrentApt(void)
#define ICOM_THIS_MULTI(impl,field,iface) impl* const This=(impl*)((char*)(iface) - offsetof(impl,field))
/* helpers for debugging */
#ifdef __i386__
# define DEBUG_SET_CRITSEC_NAME(cs, name) (cs)->DebugInfo->Spare[1] = (DWORD)(__FILE__ ": " name)
# define DEBUG_CLEAR_CRITSEC_NAME(cs) (cs)->DebugInfo->Spare[1] = 0
#else
# define DEBUG_SET_CRITSEC_NAME(cs, name)
# define DEBUG_CLEAR_CRITSEC_NAME(cs)
#endif
# define DEBUG_SET_CRITSEC_NAME(cs, name) (cs)->DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": " name)
# define DEBUG_CLEAR_CRITSEC_NAME(cs) (cs)->DebugInfo->Spare[0] = 0
extern HINSTANCE OLE32_hInstance; /* FIXME: make static */

View File

@ -88,7 +88,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &git_section,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": global interface table") }
0, 0, { (DWORD_PTR)(__FILE__ ": global interface table") }
};
static CRITICAL_SECTION git_section = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -68,7 +68,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &IMalloc32_SpyCS,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": IMalloc32_SpyCS") }
0, 0, { (DWORD_PTR)(__FILE__ ": IMalloc32_SpyCS") }
};
static CRITICAL_SECTION IMalloc32_SpyCS = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -63,7 +63,7 @@ static CRITICAL_SECTION_DEBUG csRegIf_debug =
{
0, 0, &csRegIf,
{ &csRegIf_debug.ProcessLocksList, &csRegIf_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": dcom registered server interfaces") }
0, 0, { (DWORD_PTR)(__FILE__ ": dcom registered server interfaces") }
};
static CRITICAL_SECTION csRegIf = { &csRegIf_debug, -1, 0, 0, 0, 0 };

View File

@ -2155,7 +2155,7 @@ static CRITICAL_SECTION_DEBUG cache_section_debug =
{
0, 0, &cache_section,
{ &cache_section_debug.ProcessLocksList, &cache_section_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": typelib loader cache") }
0, 0, { (DWORD_PTR)(__FILE__ ": typelib loader cache") }
};
static CRITICAL_SECTION cache_section = { &cache_section_debug, -1, 0, 0, 0, 0 };

View File

@ -78,7 +78,7 @@ static CRITICAL_SECTION_DEBUG server_cs_debug =
{
0, 0, &server_cs,
{ &server_cs_debug.ProcessLocksList, &server_cs_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": server_cs") }
0, 0, { (DWORD_PTR)(__FILE__ ": server_cs") }
};
static CRITICAL_SECTION server_cs = { &server_cs_debug, -1, 0, 0, 0, 0 };
@ -87,7 +87,7 @@ static CRITICAL_SECTION_DEBUG listen_cs_debug =
{
0, 0, &listen_cs,
{ &listen_cs_debug.ProcessLocksList, &listen_cs_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": listen_cs") }
0, 0, { (DWORD_PTR)(__FILE__ ": listen_cs") }
};
static CRITICAL_SECTION listen_cs = { &listen_cs_debug, -1, 0, 0, 0, 0 };
@ -109,7 +109,7 @@ static CRITICAL_SECTION_DEBUG spacket_cs_debug =
{
0, 0, &spacket_cs,
{ &spacket_cs_debug.ProcessLocksList, &spacket_cs_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": spacket_cs") }
0, 0, { (DWORD_PTR)(__FILE__ ": spacket_cs") }
};
static CRITICAL_SECTION spacket_cs = { &spacket_cs_debug, -1, 0, 0, 0, 0 };

View File

@ -129,7 +129,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &uuid_cs,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": uuid_cs") }
0, 0, { (DWORD_PTR)(__FILE__ ": uuid_cs") }
};
static CRITICAL_SECTION uuid_cs = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -36,7 +36,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &SHELL32_ChangenotifyCS,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": SHELL32_ChangenotifyCS") }
0, 0, { (DWORD_PTR)(__FILE__ ": SHELL32_ChangenotifyCS") }
};
static CRITICAL_SECTION SHELL32_ChangenotifyCS = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -67,7 +67,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &SHELL32_SicCS,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": SHELL32_SicCS") }
0, 0, { (DWORD_PTR)(__FILE__ ": SHELL32_SicCS") }
};
static CRITICAL_SECTION SHELL32_SicCS = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -127,7 +127,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &IconCrst,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": IconCrst") }
0, 0, { (DWORD_PTR)(__FILE__ ": IconCrst") }
};
static CRITICAL_SECTION IconCrst = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -55,7 +55,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &WDML_CritSect,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": WDML_CritSect") }
0, 0, { (DWORD_PTR)(__FILE__ ": WDML_CritSect") }
};
CRITICAL_SECTION WDML_CritSect = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -1203,7 +1203,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &dde_crst,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": dde_crst") }
0, 0, { (DWORD_PTR)(__FILE__ ": dde_crst") }
};
static CRITICAL_SECTION dde_crst = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -43,7 +43,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &USER_SysLevel.crst,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": USER_SysLevel") }
0, 0, { (DWORD_PTR)(__FILE__ ": USER_SysLevel") }
};
static SYSLEVEL USER_SysLevel = { { &critsect_debug, -1, 0, 0, 0, 0 }, 2 };

View File

@ -129,7 +129,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &winproc_cs,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": winproc_cs") }
0, 0, { (DWORD_PTR)(__FILE__ ": winproc_cs") }
};
static CRITICAL_SECTION winproc_cs = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -59,7 +59,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &ASPI_CritSection,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": ASPI_CritSection") }
0, 0, { (DWORD_PTR)(__FILE__ ": ASPI_CritSection") }
};
static CRITICAL_SECTION ASPI_CritSection = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -81,7 +81,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &qcrit,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": qcrit") }
0, 0, { (DWORD_PTR)(__FILE__ ": qcrit") }
};
static CRITICAL_SECTION qcrit = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -147,7 +147,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &vga_lock,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": vga_lock") }
0, 0, { (DWORD_PTR)(__FILE__ ": vga_lock") }
};
static CRITICAL_SECTION vga_lock = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -109,7 +109,7 @@ static CRITICAL_SECTION_DEBUG WININET_cs_debug =
{
0, 0, &WININET_cs,
{ &WININET_cs_debug.ProcessLocksList, &WININET_cs_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": WININET_cs") }
0, 0, { (DWORD_PTR)(__FILE__ ": WININET_cs") }
};
static CRITICAL_SECTION WININET_cs = { &WININET_cs_debug, -1, 0, 0, 0, 0 };

View File

@ -102,7 +102,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &crit_sect,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": crit_sect") }
0, 0, { (DWORD_PTR)(__FILE__ ": crit_sect") }
};
static CRITICAL_SECTION crit_sect = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -1176,7 +1176,7 @@ static int OSS_InitRingMessage(OSS_MSG_RING* omr)
omr->ring_buffer_size = OSS_RING_BUFFER_INCREMENT;
omr->messages = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,omr->ring_buffer_size * sizeof(OSS_MSG));
InitializeCriticalSection(&omr->msg_crst);
omr->msg_crst.DebugInfo->Spare[1] = (DWORD)"WINEOSS_msg_crst";
omr->msg_crst.DebugInfo->Spare[0] = (DWORD_PTR)"WINEOSS_msg_crst";
return 0;
}

View File

@ -126,7 +126,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &crit_sect,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": crit_sect") }
0, 0, { (DWORD_PTR)(__FILE__ ": crit_sect") }
};
static CRITICAL_SECTION crit_sect = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -76,7 +76,7 @@ static BOOL WINMM_CreateIData(HINSTANCE hInstDLL)
WINMM_IData.hWinMM32Instance = hInstDLL;
InitializeCriticalSection(&WINMM_IData.cs);
WINMM_IData.cs.DebugInfo->Spare[1] = (DWORD)"WINMM_IData";
WINMM_IData.cs.DebugInfo->Spare[0] = (DWORD_PTR)"WINMM_IData";
WINMM_IData.psStopEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
WINMM_IData.psLastEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
TRACE("Initialized IData (%p)\n", &WINMM_IData);

View File

@ -121,7 +121,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &csWSgetXXXbyYYY,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": csWSgetXXXbyYYY") }
0, 0, { (DWORD_PTR)(__FILE__ ": csWSgetXXXbyYYY") }
};
CRITICAL_SECTION csWSgetXXXbyYYY = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -69,7 +69,7 @@ static CRITICAL_SECTION_DEBUG printer_handles_cs_debug =
{
0, 0, &printer_handles_cs,
{ &printer_handles_cs_debug.ProcessLocksList, &printer_handles_cs_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": printer_handles_cs") }
0, 0, { (DWORD_PTR)(__FILE__ ": printer_handles_cs") }
};
static CRITICAL_SECTION printer_handles_cs = { &printer_handles_cs_debug, -1, 0, 0, 0, 0 };

View File

@ -57,7 +57,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &dce_section,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": dce_section") }
0, 0, { (DWORD_PTR)(__FILE__ ": dce_section") }
};
static CRITICAL_SECTION dce_section = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -51,7 +51,7 @@ static CRITICAL_SECTION_DEBUG dibs_cs_debug =
{
0, 0, &dibs_cs,
{ &dibs_cs_debug.ProcessLocksList, &dibs_cs_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": dibs_cs") }
0, 0, { (DWORD_PTR)(__FILE__ ": dibs_cs") }
};
static CRITICAL_SECTION dibs_cs = { &dibs_cs_debug, -1, 0, 0, 0, 0 };

View File

@ -57,7 +57,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &X11DRV_CritSection,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": X11DRV_CritSection") }
0, 0, { (DWORD_PTR)(__FILE__ ": X11DRV_CritSection") }
};
static CRITICAL_SECTION X11DRV_CritSection = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -73,7 +73,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &xdnd_cs,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": xdnd_cs") }
0, 0, { (DWORD_PTR)(__FILE__ ": xdnd_cs") }
};
static CRITICAL_SECTION xdnd_cs = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -325,7 +325,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &crtsc_fonts_X11,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": crtsc_fonts_X11") }
0, 0, { (DWORD_PTR)(__FILE__ ": crtsc_fonts_X11") }
};
static CRITICAL_SECTION crtsc_fonts_X11 = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -137,7 +137,7 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &xrender_cs,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
0, 0, { 0, (DWORD)(__FILE__ ": xrender_cs") }
0, 0, { (DWORD_PTR)(__FILE__ ": xrender_cs") }
};
static CRITICAL_SECTION xrender_cs = { &critsect_debug, -1, 0, 0, 0, 0 };

View File

@ -3985,7 +3985,11 @@ typedef struct _RTL_CRITICAL_SECTION_DEBUG
LIST_ENTRY ProcessLocksList;
DWORD EntryCount;
DWORD ContentionCount;
#ifdef __WINESRC__ /* in Wine we store the name here */
DWORD_PTR Spare[8/sizeof(DWORD_PTR)];
#else
DWORD Spare[ 2 ];
#endif
} RTL_CRITICAL_SECTION_DEBUG, *PRTL_CRITICAL_SECTION_DEBUG, RTL_RESOURCE_DEBUG, *PRTL_RESOURCE_DEBUG;
typedef struct _RTL_CRITICAL_SECTION {