From 919ef9dc37f7b222fe7f11af5889c3a86a4c2469 Mon Sep 17 00:00:00 2001 From: Oleksiy Vyalov Date: Thu, 7 May 2015 15:28:49 +0000 Subject: Use file locks to synchronize access to ModuleCache. http://reviews.llvm.org/D9056 llvm-svn: 236736 --- lldb/source/Utility/ModuleCache.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'lldb/source/Utility/ModuleCache.h') diff --git a/lldb/source/Utility/ModuleCache.h b/lldb/source/Utility/ModuleCache.h index 5b484aae523..644f53f7c97 100644 --- a/lldb/source/Utility/ModuleCache.h +++ b/lldb/source/Utility/ModuleCache.h @@ -14,6 +14,7 @@ #include "lldb/lldb-forward.h" #include "lldb/Core/Error.h" +#include "lldb/Host/File.h" #include "lldb/Host/FileSpec.h" #include @@ -45,8 +46,17 @@ class UUID; class ModuleCache { public: - using Downloader = std::function; + using Downloader = std::function; + Error + GetAndPut(const FileSpec &root_dir_spec, + const char *hostname, + const ModuleSpec &module_spec, + const Downloader &downloader, + lldb::ModuleSP &cached_module_sp, + bool *did_create_ptr); + +private: Error Put (const FileSpec &root_dir_spec, const char *hostname, @@ -60,15 +70,6 @@ public: lldb::ModuleSP &cached_module_sp, bool *did_create_ptr); - Error - GetAndPut(const FileSpec &root_dir_spec, - const char *hostname, - const ModuleSpec &module_spec, - const Downloader &downloader, - lldb::ModuleSP &cached_module_sp, - bool *did_create_ptr); - -private: static FileSpec GetModuleDirectory (const FileSpec &root_dir_spec, const UUID &uuid); -- cgit v1.2.3