kern: remove firmare-specific SignalAndModify impl

Nintendo made this breaking change because there was zero official software relying on it,
so it's safe for us to make the same change.
This commit is contained in:
Michael Scire 2021-07-22 15:56:43 -07:00
parent 73afa042f1
commit f5704d25f8

View file

@ -103,7 +103,6 @@ namespace ams::kern {
auto it = m_tree.nfind_key({ addr, -1 }); auto it = m_tree.nfind_key({ addr, -1 });
/* Determine the updated value. */ /* Determine the updated value. */
s32 new_value; s32 new_value;
if (GetTargetFirmware() >= TargetFirmware_7_0_0) {
if (count <= 0) { if (count <= 0) {
if ((it != m_tree.end()) && (it->GetAddressArbiterKey() == addr)) { if ((it != m_tree.end()) && (it->GetAddressArbiterKey() == addr)) {
new_value = value - 2; new_value = value - 2;
@ -129,30 +128,6 @@ namespace ams::kern {
new_value = value + 1; new_value = value + 1;
} }
} }
} else {
if (count <= 0) {
if ((it != m_tree.end()) && (it->GetAddressArbiterKey() == addr)) {
new_value = value - 1;
} else {
new_value = value + 1;
}
} else {
auto tmp_it = it;
s32 tmp_num_waiters = 0;
while ((tmp_it != m_tree.end()) && (tmp_it->GetAddressArbiterKey() == addr) && (tmp_num_waiters < count + 1)) {
++tmp_num_waiters;
++tmp_it;
}
if (tmp_num_waiters == 0) {
new_value = value + 1;
} else if (tmp_num_waiters <= count) {
new_value = value - 1;
} else {
new_value = value;
}
}
}
/* Check the userspace value. */ /* Check the userspace value. */
s32 user_value; s32 user_value;