| 65 | |
| 66 | |
| 67 | static void potential_deadlock_detected(const std::pair<void*, void*>& mismatch, const LockStack& s1, const LockStack& s2) |
| 68 | { |
| 69 | LogPrintf("POTENTIAL DEADLOCK DETECTED\n"); |
| 70 | LogPrintf("Previous lock order was:\n"); |
| 71 | for (const PAIRTYPE(void*, CLockLocation) & i : s2) { |
| 72 | if (i.first == mismatch.first) |
| 73 | LogPrintf(" (1)"); |
| 74 | if (i.first == mismatch.second) |
| 75 | LogPrintf(" (2)"); |
| 76 | LogPrintf(" %s\n", i.second.ToString()); |
| 77 | } |
| 78 | LogPrintf("Current lock order is:\n"); |
| 79 | for (const PAIRTYPE(void*, CLockLocation) & i : s1) { |
| 80 | if (i.first == mismatch.first) |
| 81 | LogPrintf(" (1)"); |
| 82 | if (i.first == mismatch.second) |
| 83 | LogPrintf(" (2)"); |
| 84 | LogPrintf(" %s\n", i.second.ToString()); |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | static void push_lock(void* c, const CLockLocation& locklocation, bool fTry) |
| 89 | { |