htc: implement much of worker receive logic

This commit is contained in:
Michael Scire
2021-02-08 14:11:01 -08:00
committed by SciresM
parent 8f85cc17dc
commit 679fec2ddc
19 changed files with 565 additions and 12 deletions

View File

@@ -26,6 +26,14 @@ namespace ams::htclow::mux {
}
}
void TaskManager::NotifyReceiveData(impl::ChannelInternalType channel, size_t size) {
for (auto i = 0; i < MaxTaskCount; ++i) {
if (m_valid[i] && m_tasks[i].channel == channel && m_tasks[i].size <= size) {
this->CompleteTask(i, EventTrigger_ReceiveData);
}
}
}
void TaskManager::NotifyConnectReady() {
for (auto i = 0; i < MaxTaskCount; ++i) {
if (m_valid[i] && m_tasks[i].type == TaskType_Connect) {