diff options
author | Oleksiy Vyalov <ovyalov@google.com> | 2015-05-07 15:28:49 +0000 |
---|---|---|
committer | Oleksiy Vyalov <ovyalov@google.com> | 2015-05-07 15:28:49 +0000 |
commit | 919ef9dc37f7b222fe7f11af5889c3a86a4c2469 (patch) | |
tree | 027f1e8b488c77a32795a184c35044709564b36b /lldb/source/Utility/ModuleCache.h | |
parent | 9f88702ac605c776de54f09018af7f2e52c74714 (diff) | |
download | bcm5719-llvm-919ef9dc37f7b222fe7f11af5889c3a86a4c2469.tar.gz bcm5719-llvm-919ef9dc37f7b222fe7f11af5889c3a86a4c2469.zip |
Use file locks to synchronize access to ModuleCache.
http://reviews.llvm.org/D9056
llvm-svn: 236736
Diffstat (limited to 'lldb/source/Utility/ModuleCache.h')
-rw-r--r-- | lldb/source/Utility/ModuleCache.h | 21 |
1 files changed, 11 insertions, 10 deletions
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 <functional> @@ -45,9 +46,18 @@ class UUID; class ModuleCache { public: - using Downloader = std::function<Error (const ModuleSpec&, FileSpec&)>; + using Downloader = std::function<Error (const ModuleSpec&, const FileSpec&)>; 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, const ModuleSpec &module_spec, @@ -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); |