From c30594943547c553589ab8d2470311a8b3099953 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Thu, 25 Dec 2014 23:30:34 +0300 Subject: [PATCH] Compilation fix --- Utilities/Thread.cpp | 5 +++++ Utilities/Thread.h | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Utilities/Thread.cpp b/Utilities/Thread.cpp index b7df2a5c96..6d6fdfa9c9 100644 --- a/Utilities/Thread.cpp +++ b/Utilities/Thread.cpp @@ -302,3 +302,8 @@ void waiter_map_t::notify(u64 signal_id) } } } + +bool squeue_test_exit(const volatile bool* do_exit) +{ + return Emu.IsStopped() || (do_exit && *do_exit); +} diff --git a/Utilities/Thread.h b/Utilities/Thread.h index dbe12c6016..30ed0b0186 100644 --- a/Utilities/Thread.h +++ b/Utilities/Thread.h @@ -148,6 +148,8 @@ public: void notify(u64 signal_id); }; +bool squeue_test_exit(const volatile bool* do_exit); + template class squeue_t { @@ -207,7 +209,7 @@ public: return true; })) { - if (Emu.IsStopped() || (do_exit && *do_exit)) + if (squeue_test_exit(do_exit)) { return false; } @@ -258,7 +260,7 @@ public: return true; })) { - if (Emu.IsStopped() || (do_exit && *do_exit)) + if (squeue_test_exit(do_exit)) { return false; } @@ -341,7 +343,7 @@ public: return true; })) { - if (Emu.IsStopped() || (do_exit && *do_exit)) + if (squeue_test_exit(do_exit)) { return false; }