diff options
author | bunnei <bunneidev@gmail.com> | 2022-10-29 22:19:33 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2022-11-04 05:17:06 +0100 |
commit | 37b17252d175478dea7e1eeaf7332da1558f0373 (patch) | |
tree | e3e38213f59bbbc38938eec9c69097742cf3b8a0 /src/core/hle/kernel/k_event_info.h | |
parent | core: hle: kernel: Add KDebug. (diff) | |
download | yuzu-37b17252d175478dea7e1eeaf7332da1558f0373.tar yuzu-37b17252d175478dea7e1eeaf7332da1558f0373.tar.gz yuzu-37b17252d175478dea7e1eeaf7332da1558f0373.tar.bz2 yuzu-37b17252d175478dea7e1eeaf7332da1558f0373.tar.lz yuzu-37b17252d175478dea7e1eeaf7332da1558f0373.tar.xz yuzu-37b17252d175478dea7e1eeaf7332da1558f0373.tar.zst yuzu-37b17252d175478dea7e1eeaf7332da1558f0373.zip |
Diffstat (limited to 'src/core/hle/kernel/k_event_info.h')
-rw-r--r-- | src/core/hle/kernel/k_event_info.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/src/core/hle/kernel/k_event_info.h b/src/core/hle/kernel/k_event_info.h new file mode 100644 index 000000000..25b3ff594 --- /dev/null +++ b/src/core/hle/kernel/k_event_info.h @@ -0,0 +1,64 @@ +// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include <array> + +#include <boost/intrusive/list.hpp> + +#include "core/hle/kernel/slab_helpers.h" +#include "core/hle/kernel/svc_types.h" + +namespace Kernel { + +class KEventInfo : public KSlabAllocated<KEventInfo>, public boost::intrusive::list_base_hook<> { +public: + struct InfoCreateThread { + u32 thread_id{}; + uintptr_t tls_address{}; + }; + + struct InfoExitProcess { + Svc::ProcessExitReason reason{}; + }; + + struct InfoExitThread { + Svc::ThreadExitReason reason{}; + }; + + struct InfoException { + Svc::DebugException exception_type{}; + s32 exception_data_count{}; + uintptr_t exception_address{}; + std::array<uintptr_t, 4> exception_data{}; + }; + + struct InfoSystemCall { + s64 tick{}; + s32 id{}; + }; + +public: + KEventInfo() = default; + ~KEventInfo() = default; + +public: + Svc::DebugEvent event{}; + u32 thread_id{}; + u32 flags{}; + bool is_attached{}; + bool continue_flag{}; + bool ignore_continue{}; + bool close_once{}; + union { + InfoCreateThread create_thread; + InfoExitProcess exit_process; + InfoExitThread exit_thread; + InfoException exception; + InfoSystemCall system_call; + } info{}; + KThread* debug_thread{}; +}; + +} // namespace Kernel |