MCPcopy Create free account
hub / github.com/LUX-Core/lux / potential_deadlock_detected

Function potential_deadlock_detected

src/sync.cpp:67–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65
66
67static 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
88static void push_lock(void* c, const CLockLocation& locklocation, bool fTry)
89{

Callers 1

push_lockFunction · 0.85

Calls 1

ToStringMethod · 0.45

Tested by

no test coverage detected