Francois Gouget : msvcrt: Give a name to the critical sections.
Alexandre Julliard
julliard at winehq.org
Mon Nov 14 13:34:00 CST 2011
Module: wine
Branch: master
Commit: f2043352d1bedc31a286facce09d7e644c67b672
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f2043352d1bedc31a286facce09d7e644c67b672
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Mon Nov 14 15:10:55 2011 +0100
msvcrt: Give a name to the critical sections.
---
dlls/msvcrt/file.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c
index 90e0d80..b6af98f 100644
--- a/dlls/msvcrt/file.c
+++ b/dlls/msvcrt/file.c
@@ -379,7 +379,10 @@ static int msvcrt_init_fp(MSVCRT_FILE* file, int fd, unsigned stream_flags)
file->_flag = stream_flags;
if(file<MSVCRT__iob || file>=MSVCRT__iob+_IOB_ENTRIES)
+ {
InitializeCriticalSection(&((file_crit*)file)->crit);
+ ((file_crit*)file)->crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": file_crit.crit");
+ }
TRACE(":got FILE* (%p)\n",file);
return 0;
@@ -2608,7 +2611,10 @@ int CDECL MSVCRT_fclose(MSVCRT_FILE* file)
file->_flag = 0;
MSVCRT__unlock_file(file);
if(file<MSVCRT__iob || file>=MSVCRT__iob+_IOB_ENTRIES)
+ {
+ ((file_crit*)file)->crit.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&((file_crit*)file)->crit);
+ }
if(file == msvcrt_get_file(MSVCRT_stream_idx-1)) {
while(MSVCRT_stream_idx>3 && !file->_flag) {
More information about the wine-cvs
mailing list