Jan Zerebecki : msvcrt: Add DebugInfo to critical sections.
Module: wine Branch: master Commit: 3b32ae2a54dd099793a73e98ed3a0e4ec57d0ede URL: http://source.winehq.org/git/wine.git/?a=commit;h=3b32ae2a54dd099793a73e98ed... Author: Jan Zerebecki <jan.wine(a)zerebecki.de> Date: Sat Mar 10 22:09:17 2007 +0100 msvcrt: Add DebugInfo to critical sections. --- dlls/msvcrt/file.c | 2 ++ dlls/msvcrt/lock.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 2a44e6d..fa93204 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -328,6 +328,7 @@ void msvcrt_init_io(void) int i; InitializeCriticalSection(&MSVCRT_file_cs); + MSVCRT_file_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": MSVCRT_file_cs"); GetStartupInfoA(&si); if (si.cbReserved2 != 0 && si.lpReserved2 != NULL) { @@ -796,6 +797,7 @@ void msvcrt_free_io(void) MSVCRT_fclose(&MSVCRT__iob[0]); MSVCRT_fclose(&MSVCRT__iob[1]); MSVCRT_fclose(&MSVCRT__iob[2]); + MSVCRT_file_cs.DebugInfo->Spare[0] = 0; DeleteCriticalSection(&MSVCRT_file_cs); } diff --git a/dlls/msvcrt/lock.c b/dlls/msvcrt/lock.c index 8b2090f..a273fe1 100644 --- a/dlls/msvcrt/lock.c +++ b/dlls/msvcrt/lock.c @@ -42,11 +42,13 @@ 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) ); + lock_table[ locknum ].crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": LOCKTABLEENTRY.crit"); msvcrt_mlock_set_entry_initialized( locknum, TRUE ); } static inline void msvcrt_uninitialize_mlock( int locknum ) { + lock_table[ locknum ].crit.DebugInfo->Spare[0] = 0; DeleteCriticalSection( &(lock_table[ locknum ].crit) ); msvcrt_mlock_set_entry_initialized( locknum, FALSE ); } @@ -136,4 +138,3 @@ void CDECL _unlock( int locknum ) LeaveCriticalSection( &(lock_table[ locknum ].crit) ); } -
participants (1)
-
Alexandre Julliard