mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
Misc fixes for older platforms
This commit is contained in:
parent
51b65cd126
commit
8d7017273f
2 changed files with 10 additions and 10 deletions
|
|
@ -34,11 +34,10 @@
|
|||
#include <unordered_map>
|
||||
#include <mutex>
|
||||
|
||||
|
||||
#include "gidcache.hpp"
|
||||
|
||||
std::mutex g_REGISTERED_CACHES_MUTEX;
|
||||
std::unordered_map<pid_t,GIDCache*> g_REGISTERED_CACHES;
|
||||
std::mutex g_REGISTERED_CACHES_MUTEX;
|
||||
std::unordered_map<pthread_t,GIDCache*> g_REGISTERED_CACHES;
|
||||
|
||||
|
||||
inline
|
||||
|
|
@ -55,11 +54,11 @@ GIDCache::GIDCache()
|
|||
{
|
||||
std::lock_guard<std::mutex> guard(g_REGISTERED_CACHES_MUTEX);
|
||||
|
||||
pid_t tid;
|
||||
bool inserted;
|
||||
bool inserted;
|
||||
pthread_t pthid;
|
||||
|
||||
tid = ::gettid();
|
||||
inserted = g_REGISTERED_CACHES.emplace(tid,this).second;
|
||||
pthid = pthread_self();
|
||||
inserted = g_REGISTERED_CACHES.emplace(pthid,this).second;
|
||||
|
||||
assert(inserted == true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue