htc: implement remaining worker thread send logic (for channel mux)

This commit is contained in:
Michael Scire
2021-02-09 03:21:45 -08:00
committed by SciresM
parent df3d62df84
commit 4ed665bcd3
14 changed files with 346 additions and 13 deletions

View File

@@ -34,6 +34,22 @@ namespace ams::htclow::mux {
}
}
void TaskManager::NotifySendReady() {
for (auto i = 0; i < MaxTaskCount; ++i) {
if (m_valid[i] && m_tasks[i].type == TaskType_Send) {
this->CompleteTask(i, EventTrigger_SendReady);
}
}
}
void TaskManager::NotifySendBufferEmpty(impl::ChannelInternalType channel) {
for (auto i = 0; i < MaxTaskCount; ++i) {
if (m_valid[i] && m_tasks[i].channel == channel && m_tasks[i].type == TaskType_Flush) {
this->CompleteTask(i, EventTrigger_SendBufferEmpty);
}
}
}
void TaskManager::NotifyConnectReady() {
for (auto i = 0; i < MaxTaskCount; ++i) {
if (m_valid[i] && m_tasks[i].type == TaskType_Connect) {