summaryrefslogtreecommitdiffstats
path: root/src/common/thread.h
diff options
context:
space:
mode:
authorfearlessTobi <thm.frey@gmail.com>2018-09-15 15:21:06 +0200
committerfearlessTobi <thm.frey@gmail.com>2018-09-15 15:21:06 +0200
commit63c2e32e207d31ecadd9022e1d7cd705c9febac8 (patch)
tree8a90e8ef2804f147dff7225a543a8740ecf7160c /src/common/thread.h
parentMerge pull request #1310 from lioncash/kernel-ns (diff)
downloadyuzu-63c2e32e207d31ecadd9022e1d7cd705c9febac8.tar
yuzu-63c2e32e207d31ecadd9022e1d7cd705c9febac8.tar.gz
yuzu-63c2e32e207d31ecadd9022e1d7cd705c9febac8.tar.bz2
yuzu-63c2e32e207d31ecadd9022e1d7cd705c9febac8.tar.lz
yuzu-63c2e32e207d31ecadd9022e1d7cd705c9febac8.tar.xz
yuzu-63c2e32e207d31ecadd9022e1d7cd705c9febac8.tar.zst
yuzu-63c2e32e207d31ecadd9022e1d7cd705c9febac8.zip
Diffstat (limited to '')
-rw-r--r--src/common/thread.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/common/thread.h b/src/common/thread.h
index 9465e1de7..12a1c095c 100644
--- a/src/common/thread.h
+++ b/src/common/thread.h
@@ -60,12 +60,12 @@ private:
class Barrier {
public:
- explicit Barrier(size_t count_) : count(count_), waiting(0), generation(0) {}
+ explicit Barrier(std::size_t count_) : count(count_), waiting(0), generation(0) {}
/// Blocks until all "count" threads have called Sync()
void Sync() {
std::unique_lock<std::mutex> lk(mutex);
- const size_t current_generation = generation;
+ const std::size_t current_generation = generation;
if (++waiting == count) {
generation++;
@@ -80,9 +80,9 @@ public:
private:
std::condition_variable condvar;
std::mutex mutex;
- const size_t count;
- size_t waiting;
- size_t generation; // Incremented once each time the barrier is used
+ const std::size_t count;
+ std::size_t waiting;
+ std::size_t generation; // Incremented once each time the barrier is used
};
void SleepCurrentThread(int ms);