aboutsummaryrefslogtreecommitdiff
path: root/src/teakra
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2022-10-25 00:09:43 +0200
committerArisotura <thetotalworm@gmail.com>2022-10-25 00:09:43 +0200
commit936011964ce69158367654cbcdbc30bb0d06376a (patch)
treef8c834a26d1f17dbbeddb3a733fa6800531d370b /src/teakra
parent9e449d902d860edc5b26dc31c19672b0d812785b (diff)
comment out semaphore shit in teakra
Diffstat (limited to 'src/teakra')
-rw-r--r--src/teakra/src/apbp.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/teakra/src/apbp.cpp b/src/teakra/src/apbp.cpp
index da30168..e00fb75 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<void()> 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<void()> 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