MCPcopy Create free account
hub / github.com/Bareflank/hypervisor / initialize

Method initialize

kernel/mocks/ext_t.hpp:130–148  ·  view source on GitHub ↗

<!-- description --> @brief Initializes this ext_t <!-- inputs/outputs --> @param tls the current TLS block @param page_pool the page_pool_t to use @param i the ID for this ext_t @param file the ELF file for this ext_t @param system_rpt the system RPT provided by the loader @return Returns bsl::errc_success on success, bsl::errc_failure and friends otherwise

Source from the content-addressed store, hash-verified

128 /// and friends otherwise
129 ///
130 [[nodiscard]] constexpr auto
131 initialize(
132 tls_t const &tls,
133 page_pool_t const &page_pool,
134 bsl::safe_u16 const &i,
135 loader::ext_elf_file_t const *const file,
136 root_page_table_t const &system_rpt) noexcept -> bsl::errc_type
137 {
138 bsl::expects(i.is_valid_and_checked());
139 bsl::expects(i != syscall::BF_INVALID_ID);
140
141 bsl::discard(file);
142 bsl::discard(page_pool);
143 bsl::discard(system_rpt);
144
145 m_id = ~i;
146 m_handle = syscall::BF_INVALID_HANDLE;
147 return tls.test_ret;
148 }
149
150 /// <!-- description -->
151 /// @brief Release the ext_t

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected