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

Function ext_main_entry

kernel/integration/bf_handle_op_close_handle.cpp:241–266  ·  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 // close without open
253 mut_ret = bf_handle_op_close_handle_impl(mut_hndl.get());
254 integration::require(mut_ret != BF_STATUS_SUCCESS);
255
256 // close twice
257 mut_ret = bf_handle_op_open_handle_impl(BF_SPEC_ID1_VAL.get(), mut_hndl.data());
258 integration::require(mut_ret == BF_STATUS_SUCCESS);
259 mut_ret = bf_handle_op_close_handle_impl(mut_hndl.get());
260 integration::require(mut_ret == BF_STATUS_SUCCESS);
261 mut_ret = bf_handle_op_close_handle_impl(mut_hndl.get());
262 integration::require(mut_ret != BF_STATUS_SUCCESS);
263
264 bsl::debug() << "success. remaining backtrace is expected\n" << bsl::here();
265 return bf_control_op_exit();
266 }
267}

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