diff options
author | Zachary Turner <zturner@google.com> | 2017-05-10 17:39:18 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-05-10 17:39:18 +0000 |
commit | 0a340ce3bc5cea0ffaeae4bbc58be5b63d878c19 (patch) | |
tree | 30a8c525c157723ca3c9bcb07f3f6ff6b6cb5786 /lld/include/lld | |
parent | c47f039efde8690d27264fe41c5fa28d76c04053 (diff) | |
download | bcm5719-llvm-0a340ce3bc5cea0ffaeae4bbc58be5b63d878c19.tar.gz bcm5719-llvm-0a340ce3bc5cea0ffaeae4bbc58be5b63d878c19.zip |
Rename variables to conform to LLVM naming conventions.
llvm-svn: 302697
Diffstat (limited to 'lld/include/lld')
-rw-r--r-- | lld/include/lld/Core/TaskGroup.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lld/include/lld/Core/TaskGroup.h b/lld/include/lld/Core/TaskGroup.h index 82e9122f4ae..6cd173ebbbb 100644 --- a/lld/include/lld/Core/TaskGroup.h +++ b/lld/include/lld/Core/TaskGroup.h @@ -25,40 +25,40 @@ namespace lld { /// /// Calling dec() on a Latch with a count of 0 has undefined behaivor. class Latch { - uint32_t _count; - mutable std::mutex _condMut; - mutable std::condition_variable _cond; + uint32_t Count; + mutable std::mutex Mutex; + mutable std::condition_variable Cond; public: - explicit Latch(uint32_t count = 0) : _count(count) {} + explicit Latch(uint32_t count = 0) : Count(count) {} ~Latch() { sync(); } void inc() { - std::unique_lock<std::mutex> lock(_condMut); - ++_count; + std::unique_lock<std::mutex> lock(Mutex); + ++Count; } void dec() { - std::unique_lock<std::mutex> lock(_condMut); - if (--_count == 0) - _cond.notify_all(); + std::unique_lock<std::mutex> lock(Mutex); + if (--Count == 0) + Cond.notify_all(); } void sync() const { - std::unique_lock<std::mutex> lock(_condMut); - _cond.wait(lock, [&] { return _count == 0; }); + std::unique_lock<std::mutex> lock(Mutex); + Cond.wait(lock, [&] { return Count == 0; }); } }; /// \brief Allows launching a number of tasks and waiting for them to finish /// either explicitly via sync() or implicitly on destruction. class TaskGroup { - Latch _latch; + Latch L; public: - void spawn(std::function<void()> f); + void spawn(std::function<void()> F); - void sync() const { _latch.sync(); } + void sync() const { L.sync(); } }; } |