]> git.itanic.dy.fi Git - rrdd/commit
Improve mutex debugging prints
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Sat, 14 Jan 2017 15:39:14 +0000 (17:39 +0200)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Sat, 14 Jan 2017 15:39:14 +0000 (17:39 +0200)
commitc8f7a45a0aa73418ebbb3cf8aca40b67a7572fdc
tree41bafceb8af30df25e5a4207ef3406ced44e09fc
parent98e1376b9b6dd62c1aadc54f51afc96881644e78
Improve mutex debugging prints

When lock contention is detected, print also the name of the thread
holding the lock and also where the lock was tried to acquire.

After the lock is finally acquired after the contention, add a new
print there as well to indicate that the lock is now acquired and the
thread will continue.

This adds overhead to the mutex operations, but that shouldn't be an
issue yet. If it becomes too slow, an option can be added later to
remove the prints and the overhead altogether. Now we are more happy
about the improved verbosity of the locking operations.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
process.c
process.h