mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-29 14:05:17 -04:00
htc: declare and begin impl of HtclowManagerImpl interface
This commit is contained in:
parent
968ce12492
commit
e20c2450ce
20 changed files with 405 additions and 9 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue