MCPcopy Create free account
hub / github.com/acl-dev/acl / deadlock

Method deadlock

lib_fiber/cpp/src/fiber_mutex.cpp:41–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41bool fiber_mutex::deadlock(fiber_mutex_stats& out)
42{
43 ACL_FIBER_MUTEX_STATS *stats = acl_fiber_mutex_deadlock();
44
45 if (stats == NULL) {
46 return false;
47 }
48
49 for (size_t i = 0; i < stats->count; i++) {
50 fiber_mutex_stat stat;
51 stat.fb = new fiber(stats->stats[i].fiber);
52 stat.waiting = stats->stats[i].waiting;
53
54 for (size_t j = 0; j < stats->stats[i].count; j++) {
55 ACL_FIBER_MUTEX* mutex = stats->stats[i].holding[j];
56 stat.holding.push_back(mutex);
57 }
58
59 out.stats.push_back(stat);
60 }
61
62 acl_fiber_mutex_stats_free(stats);
63 return true;
64}
65
66static void show(const fiber_mutex_stat& s)
67{

Callers

nothing calls this directly

Calls 3

acl_fiber_mutex_deadlockFunction · 0.85
push_backMethod · 0.45

Tested by

no test coverage detected