mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
Add debugging of mutexes (#1470)
When DEBUG defined it will used timed locks which will log when held too long along with where.
This commit is contained in:
parent
4b751c2d37
commit
92312c8507
15 changed files with 352 additions and 432 deletions
|
|
@ -19,6 +19,8 @@
|
|||
#include "fs_statvfs.hpp"
|
||||
#include "statvfs_util.hpp"
|
||||
|
||||
#include "mutex.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
|
@ -82,7 +84,7 @@ namespace fs
|
|||
rv = 0;
|
||||
now = l::get_time();
|
||||
|
||||
pthread_mutex_lock(&g_cache_lock);
|
||||
mutex_lock(&g_cache_lock);
|
||||
|
||||
e = &g_cache[path_];
|
||||
|
||||
|
|
@ -94,7 +96,7 @@ namespace fs
|
|||
|
||||
*st_ = e->st;
|
||||
|
||||
pthread_mutex_unlock(&g_cache_lock);
|
||||
mutex_unlock(&g_cache_lock);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue