diff options
| author | Felix Morgner <felix.morgner@ost.ch> | 2026-07-15 15:56:43 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@ost.ch> | 2026-07-15 15:56:43 +0200 |
| commit | 014e52494a73ce80d9e4c47e4eab676213c25a03 (patch) | |
| tree | 4a1633c7d6308276db650602a0266582e2247de0 /kapi | |
| parent | 3130556cdab078de5db6fabdf6f2d57c05ced08a (diff) | |
| download | kernel-014e52494a73ce80d9e4c47e4eab676213c25a03.tar.xz kernel-014e52494a73ce80d9e4c47e4eab676213c25a03.zip | |
kernel/cpu: introduce core index number
Diffstat (limited to 'kapi')
| -rw-r--r-- | kapi/kapi/devices/cpu.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kapi/kapi/devices/cpu.hpp b/kapi/kapi/devices/cpu.hpp index f8ff60c6..a39580b4 100644 --- a/kapi/kapi/devices/cpu.hpp +++ b/kapi/kapi/devices/cpu.hpp @@ -15,12 +15,15 @@ namespace kapi::devices //! A virtual CPU Core to host all core local devices. struct core final : kapi::devices::bus { - explicit core(std::size_t major_number, std::size_t minor_number, std::uint64_t hardware_id, bool is_bsp); + explicit core(std::size_t major_number, std::size_t minor_number, std::uint64_t index, std::uint64_t hardware_id, + bool is_bsp); [[nodiscard]] auto hardware_id() const -> std::uint64_t; [[nodiscard]] auto is_bsp() const -> bool; + [[nodiscard]] auto index() const noexcept -> std::uint64_t; private: + std::uint64_t m_index; std::uint64_t m_hardware_id; bool m_is_bsp; }; |
