summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/thread.h
diff options
context:
space:
mode:
authorGravatar Subv2016-12-08 10:34:53 -0500
committerGravatar Subv2016-12-09 12:23:09 -0500
commit17b29d8865ea4d96c18f7e1671bd6d0f01eab95f (patch)
tree20137ff3eed145ae36db64ccf4b54cf37384c82c /src/core/hle/kernel/thread.h
parentUse boost remove_erase_if instead of the erase-remove idiom (diff)
downloadyuzu-17b29d8865ea4d96c18f7e1671bd6d0f01eab95f.tar.gz
yuzu-17b29d8865ea4d96c18f7e1671bd6d0f01eab95f.tar.xz
yuzu-17b29d8865ea4d96c18f7e1671bd6d0f01eab95f.zip
WaitSynch: Removed unused variables and reduced SharedPtr copies.
Define a variable with the value of the sync timeout error code. Use a boost::flat_map instead of an unordered_map to hold the equivalence of objects and wait indices in a WaitSynchN call.
Diffstat (limited to 'src/core/hle/kernel/thread.h')
-rw-r--r--src/core/hle/kernel/thread.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hle/kernel/thread.h b/src/core/hle/kernel/thread.h
index 1b29fb3a3..4c254cb9d 100644
--- a/src/core/hle/kernel/thread.h
+++ b/src/core/hle/kernel/thread.h
@@ -7,6 +7,7 @@
7#include <string> 7#include <string>
8#include <unordered_map> 8#include <unordered_map>
9#include <vector> 9#include <vector>
10#include <boost/container/flat_map.hpp>
10#include <boost/container/flat_set.hpp> 11#include <boost/container/flat_set.hpp>
11#include "common/common_types.h" 12#include "common/common_types.h"
12#include "core/core.h" 13#include "core/core.h"
@@ -153,7 +154,7 @@ public:
153 * its wait list to become ready, as a result of a WaitSynchronizationN call 154 * its wait list to become ready, as a result of a WaitSynchronizationN call
154 * with wait_all = true, or a ReplyAndReceive call. 155 * with wait_all = true, or a ReplyAndReceive call.
155 */ 156 */
156 bool IsWaitingAll() const { 157 bool IsSleepingOnWaitAll() const {
157 return !wait_objects.empty(); 158 return !wait_objects.empty();
158 } 159 }
159 160
@@ -183,7 +184,7 @@ public:
183 /// This is only populated when the thread should wait for all the objects to become ready. 184 /// This is only populated when the thread should wait for all the objects to become ready.
184 std::vector<SharedPtr<WaitObject>> wait_objects; 185 std::vector<SharedPtr<WaitObject>> wait_objects;
185 186
186 std::unordered_map<int, s32> wait_objects_index; ///< Mapping of Object ids to their position in the last waitlist that this object waited on. 187 boost::container::flat_map<int, s32> wait_objects_index; ///< Mapping of Object ids to their position in the last waitlist that this object waited on.
187 188
188 VAddr wait_address; ///< If waiting on an AddressArbiter, this is the arbitration address 189 VAddr wait_address; ///< If waiting on an AddressArbiter, this is the arbitration address
189 190