diff options
author | Liam <byteslice@airmail.cc> | 2024-02-07 05:09:43 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-02-07 18:14:46 +0100 |
commit | 9404633bfd1e4ea23ccf8ef526b2b4c564ba512d (patch) | |
tree | fe37bb0acf2383ecc625f3c278000ba5869ccbaa /src/core/hle/service/os/multi_wait_holder.cpp | |
parent | Merge pull request #12883 from FernandoS27/memory_manager_mem (diff) | |
download | yuzu-9404633bfd1e4ea23ccf8ef526b2b4c564ba512d.tar yuzu-9404633bfd1e4ea23ccf8ef526b2b4c564ba512d.tar.gz yuzu-9404633bfd1e4ea23ccf8ef526b2b4c564ba512d.tar.bz2 yuzu-9404633bfd1e4ea23ccf8ef526b2b4c564ba512d.tar.lz yuzu-9404633bfd1e4ea23ccf8ef526b2b4c564ba512d.tar.xz yuzu-9404633bfd1e4ea23ccf8ef526b2b4c564ba512d.tar.zst yuzu-9404633bfd1e4ea23ccf8ef526b2b4c564ba512d.zip |
Diffstat (limited to 'src/core/hle/service/os/multi_wait_holder.cpp')
-rw-r--r-- | src/core/hle/service/os/multi_wait_holder.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/core/hle/service/os/multi_wait_holder.cpp b/src/core/hle/service/os/multi_wait_holder.cpp new file mode 100644 index 000000000..01efa045b --- /dev/null +++ b/src/core/hle/service/os/multi_wait_holder.cpp @@ -0,0 +1,25 @@ +// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "core/hle/service/os/multi_wait.h" +#include "core/hle/service/os/multi_wait_holder.h" + +namespace Service { + +void MultiWaitHolder::LinkToMultiWait(MultiWait* multi_wait) { + if (m_multi_wait != nullptr) { + UNREACHABLE(); + } + + m_multi_wait = multi_wait; + m_multi_wait->m_wait_list.push_back(*this); +} + +void MultiWaitHolder::UnlinkFromMultiWait() { + if (m_multi_wait) { + m_multi_wait->m_wait_list.erase(m_multi_wait->m_wait_list.iterator_to(*this)); + m_multi_wait = nullptr; + } +} + +} // namespace Service |