diff --git a/src/teakra/src/apbp.cpp b/src/teakra/src/apbp.cpp index da301684..e00fb759 100644 --- a/src/teakra/src/apbp.cpp +++ b/src/teakra/src/apbp.cpp @@ -14,7 +14,7 @@ public: void Send(u16 data) { { - std::lock_guard lock(mutex); + //std::lock_guard lock(mutex); ready = true; this->data = data; if (disable_interrupt) @@ -24,20 +24,20 @@ public: handler(); } u16 Recv() { - std::lock_guard lock(mutex); + //std::lock_guard lock(mutex); ready = false; return data; } u16 Peek() const { - std::lock_guard lock(mutex); + //std::lock_guard lock(mutex); return data; } bool IsReady() const { - std::lock_guard lock(mutex); + //std::lock_guard lock(mutex); return ready; } u16 GetDisableInterrupt() const { - std::lock_guard lock(mutex); + //std::lock_guard lock(mutex); return disable_interrupt; } void SetDisableInterrupt(u16 v) { @@ -107,7 +107,7 @@ void Apbp::SetDataHandler(unsigned channel, std::function handler) { } void Apbp::SetSemaphore(u16 bits) { - std::lock_guard lock(impl->semaphore_mutex); + //std::lock_guard lock(impl->semaphore_mutex); impl->semaphore |= bits; bool new_signal = (impl->semaphore & ~impl->semaphore_mask) != 0; if (new_signal && impl->semaphore_handler) { @@ -117,33 +117,33 @@ void Apbp::SetSemaphore(u16 bits) { } void Apbp::ClearSemaphore(u16 bits) { - std::lock_guard lock(impl->semaphore_mutex); + //std::lock_guard lock(impl->semaphore_mutex); impl->semaphore &= ~bits; impl->semaphore_master_signal = (impl->semaphore & ~impl->semaphore_mask) != 0; } u16 Apbp::GetSemaphore() const { - std::lock_guard lock(impl->semaphore_mutex); + //std::lock_guard lock(impl->semaphore_mutex); return impl->semaphore; } void Apbp::MaskSemaphore(u16 bits) { - std::lock_guard lock(impl->semaphore_mutex); + //std::lock_guard lock(impl->semaphore_mutex); impl->semaphore_mask = bits; } u16 Apbp::GetSemaphoreMask() const { - std::lock_guard lock(impl->semaphore_mutex); + //std::lock_guard lock(impl->semaphore_mutex); return impl->semaphore_mask; } void Apbp::SetSemaphoreHandler(std::function handler) { - std::lock_guard lock(impl->semaphore_mutex); + //std::lock_guard lock(impl->semaphore_mutex); impl->semaphore_handler = std::move(handler); } bool Apbp::IsSemaphoreSignaled() const { - std::lock_guard lock(impl->semaphore_mutex); + //std::lock_guard lock(impl->semaphore_mutex); return impl->semaphore_master_signal; } } // namespace Teakra