Listing 4 Output file lockMonitor log
*** Detect deadlock. Dump stack of all threads in deadlock cycle *** start stack trace for thread 1732: address 2012751848 function: NtWaitForSingleObject module: ntdll.dll address 2011708251 function: ExitVDM module: KERNEL32.dll address 4241383 function: void __cdecl f1(void) file: d:\locksmonitor\main.cpp line: 20 + 14 bytes module: LocksMonitor.exe address 4241501 function: unsigned long __stdcall Thread_1(void *) file: d:\locksmonitor\main.cpp line: 29 + 0 bytes module: LocksMonitor.exe address 2011784483 function: SetThreadAffinityMask module: KERNEL32.dll finish stack trace for thread 1732: start stack trace for thread 2032: address 2012751848 function: NtWaitForSingleObject module: ntdll.dll address 2011708251 function: ExitVDM module: KERNEL32.dll address 4241223 function: void __cdecl f2(void) file: d:\locksmonitor\main.cpp line: 11 + 14 bytes module: LocksMonitor.exe address 4241565 function: unsigned long __stdcall Thread_2(void *) file: d:\locksmonitor\main.cpp line: 35 + 0 bytes module: LocksMonitor.exe address 2011784483 function: SetThreadAffinityMask module: KERNEL32.dll finish stack trace for thread 2032: killed thread 1732 In Order to break deadlock