diff options
| author | Subv <subv2112@gmail.com> | 2016-12-08 10:34:53 -0500 |
|---|---|---|
| committer | Subv <subv2112@gmail.com> | 2016-12-09 12:23:09 -0500 |
| commit | 17b29d8865ea4d96c18f7e1671bd6d0f01eab95f (patch) | |
| tree | 20137ff3eed145ae36db64ccf4b54cf37384c82c /src/core/hle/kernel/thread.h | |
| parent | 7cde5b83bc9c2dc178bca9fa16ebb28657456b81 (diff) | |
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.h | 5 |
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 @@ #include <string> #include <unordered_map> #include <vector> +#include <boost/container/flat_map.hpp> #include <boost/container/flat_set.hpp> #include "common/common_types.h" #include "core/core.h" @@ -153,7 +154,7 @@ public: * its wait list to become ready, as a result of a WaitSynchronizationN call * with wait_all = true, or a ReplyAndReceive call. */ - bool IsWaitingAll() const { + bool IsSleepingOnWaitAll() const { return !wait_objects.empty(); } @@ -183,7 +184,7 @@ public: /// This is only populated when the thread should wait for all the objects to become ready. std::vector<SharedPtr<WaitObject>> wait_objects; - std::unordered_map<int, s32> wait_objects_index; ///< Mapping of Object ids to their position in the last waitlist that this object waited on. + 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. VAddr wait_address; ///< If waiting on an AddressArbiter, this is the arbitration address |
