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.
This commit is contained in:
parent
7cde5b83bc
commit
17b29d8865
5 changed files with 63 additions and 80 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue