diff --git a/Source/Core/Common/Src/FifoQueue.h b/Source/Core/Common/Src/FifoQueue.h index 60e23bf0ee..19687e8a4e 100644 --- a/Source/Core/Common/Src/FifoQueue.h +++ b/Source/Core/Common/Src/FifoQueue.h @@ -92,43 +92,6 @@ public: m_write_ptr = m_read_ptr = new ElementPtr(); } -private: - class ElementPtr; - -public: - class iterator - { - public: - iterator() {} - bool operator==(iterator other) { return other.m_pp == m_pp; } - bool operator!=(iterator other) { return !(*this == other); } - T* operator->() { return &**this; } - T& operator*() { return (*m_pp)->current; } - void operator++() { m_pp = &(*m_pp)->next; } - protected: - iterator(ElementPtr *volatile *pp) : m_pp(pp) {} - ElementPtr *volatile *m_pp; - friend class FifoQueue; - }; - - iterator begin() - { - return iterator(&m_read_ptr); - } - - iterator end() - { - return iterator(&m_write_ptr->next); - } - - iterator erase(iterator itr) - { - ElementPtr *elp = *itr.m_pp; - *itr.m_pp = AtomicLoadAcquire(elp->next); - delete elp; - return itr; - } - private: // stores a pointer to element // and a pointer to the next ElementPtr diff --git a/Source/Core/Core/Src/CoreTiming.cpp b/Source/Core/Core/Src/CoreTiming.cpp index 377ae33a1c..1609043600 100644 --- a/Source/Core/Core/Src/CoreTiming.cpp +++ b/Source/Core/Core/Src/CoreTiming.cpp @@ -319,21 +319,9 @@ void RemoveEvent(int event_type) } } -void RemoveThreadsafeEvent(int event_type) -{ - std::lock_guard lk(tsWriteLock); - for (Common::FifoQueue::iterator itr = tsQueue.begin(); itr != tsQueue.end(); ++itr) - { - if (itr->type == event_type) - { - itr = tsQueue.erase(itr); - } - } -} - void RemoveAllEvents(int event_type) { - RemoveThreadsafeEvent(event_type); + MoveEvents(); RemoveEvent(event_type); } diff --git a/Source/Core/Core/Src/CoreTiming.h b/Source/Core/Core/Src/CoreTiming.h index bbb35f33b2..cd8321c10c 100644 --- a/Source/Core/Core/Src/CoreTiming.h +++ b/Source/Core/Core/Src/CoreTiming.h @@ -49,7 +49,6 @@ void ScheduleEvent_Threadsafe_Immediate(int event_type, u64 userdata=0); // We only permit one event of each type in the queue at a time. void RemoveEvent(int event_type); -void RemoveThreadsafeEvent(int event_type); void RemoveAllEvents(int event_type); bool IsScheduled(int event_type); void Advance(); diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp index 31baf28abb..22115e4900 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE.cpp @@ -135,7 +135,6 @@ void Init() void Reset(bool _bHard) { - CoreTiming::RemoveAllEvents(enque_reply); u32 i;