diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-11-27 16:26:48 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2022-06-28 01:10:50 +0200 |
commit | 846c994cc9ff3b53d0d3fa3cb3b8fe0418c462c6 (patch) | |
tree | 0e3b095de475c495cc5cdd09201ab1116f0b889a /src/core/core_timing.h | |
parent | Common: improve native clock. (diff) | |
download | yuzu-846c994cc9ff3b53d0d3fa3cb3b8fe0418c462c6.tar yuzu-846c994cc9ff3b53d0d3fa3cb3b8fe0418c462c6.tar.gz yuzu-846c994cc9ff3b53d0d3fa3cb3b8fe0418c462c6.tar.bz2 yuzu-846c994cc9ff3b53d0d3fa3cb3b8fe0418c462c6.tar.lz yuzu-846c994cc9ff3b53d0d3fa3cb3b8fe0418c462c6.tar.xz yuzu-846c994cc9ff3b53d0d3fa3cb3b8fe0418c462c6.tar.zst yuzu-846c994cc9ff3b53d0d3fa3cb3b8fe0418c462c6.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/core_timing.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/core/core_timing.h b/src/core/core_timing.h index d27773009..5c9ee2902 100644 --- a/src/core/core_timing.h +++ b/src/core/core_timing.h @@ -14,7 +14,6 @@ #include <vector> #include "common/common_types.h" -#include "common/thread.h" #include "common/wall_clock.h" namespace Core::Timing { @@ -146,19 +145,21 @@ private: u64 event_fifo_id = 0; std::shared_ptr<EventType> ev_lost; - Common::Event event{}; - Common::Event pause_event{}; - std::mutex basic_lock; - std::mutex advance_lock; - std::unique_ptr<std::thread> timer_thread; - std::atomic<bool> paused{}; - std::atomic<bool> paused_set{}; - std::atomic<bool> wait_set{}; - std::atomic<bool> shutting_down{}; std::atomic<bool> has_started{}; std::function<void()> on_thread_init{}; + std::vector<std::thread> worker_threads; + + std::condition_variable event_cv; + std::condition_variable wait_pause_cv; + std::condition_variable wait_signal_cv; + mutable std::mutex event_mutex; + + std::atomic<bool> paused_state{}; + bool is_paused{}; + bool shutting_down{}; bool is_multicore{}; + size_t pause_count{}; /// Cycle timing u64 ticks{}; |