htc: declare and begin impl of HtclowManagerImpl interface

This commit is contained in:
Michael Scire 2021-02-09 12:36:37 -08:00 committed by SciresM
parent 968ce12492
commit e20c2450ce
20 changed files with 405 additions and 9 deletions

View file

@ -166,4 +166,27 @@ namespace ams::htclow::mux {
}
}
Result Mux::Open(impl::ChannelInternalType channel) {
/* Lock ourselves. */
std::scoped_lock lk(m_mutex);
/* Check that the channel doesn't already exist. */
R_UNLESS(!m_channel_impl_map.Exists(channel), htclow::ResultChannelAlreadyExist());
/* Add the channel. */
R_TRY(m_channel_impl_map.AddChannel(channel));
/* Set the channel version. */
m_channel_impl_map.GetChannelImpl(channel).SetVersion(m_version);
return ResultSuccess();
}
os::EventType *Mux::GetTaskEvent(u32 task_id) {
/* Lock ourselves. */
std::scoped_lock lk(m_mutex);
return m_task_manager.GetTaskEvent(task_id);
}
}