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

Function ext_main_entry

kernel/integration/bf_callback_op_register_fail.cpp:241–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239 /// microkernel speak the same ABI.
240 ///
241 extern "C" void
242 ext_main_entry(bsl::uint32 const version) noexcept
243 {
244 bsl::safe_umx mut_hndl{};
245 bf_status_t mut_ret{};
246
247 if (bsl::unlikely(!bf_is_spec1_supported(bsl::to_u32(version)))) {
248 bsl::error() << "integration test not supported\n" << bsl::here();
249 return bf_control_op_exit();
250 }
251
252 mut_ret = bf_handle_op_open_handle_impl(BF_SPEC_ID1_VAL.get(), mut_hndl.data());
253 integration::require(mut_ret == BF_STATUS_SUCCESS);
254
255 // register nullptr
256 mut_ret = bf_callback_op_register_fail_impl(mut_hndl.get(), nullptr);
257 integration::require(mut_ret != BF_STATUS_SUCCESS);
258
259 // register twice
260 mut_ret = bf_callback_op_register_fail_impl(mut_hndl.get(), &fail_entry);
261 integration::require(mut_ret == BF_STATUS_SUCCESS);
262 mut_ret = bf_callback_op_register_fail_impl(mut_hndl.get(), &fail_entry);
263 integration::require(mut_ret != BF_STATUS_SUCCESS);
264
265 bsl::debug() << "success. remaining backtrace is expected\n" << bsl::here();
266 return bf_control_op_exit();
267 }
268}

Callers

nothing calls this directly

Calls 6

requireFunction · 0.85
bf_is_spec1_supportedFunction · 0.50
bf_control_op_exitFunction · 0.50
dataMethod · 0.45

Tested by

no test coverage detected