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

Method initialize

example/default_rust/src/vp_t.rs:57–77  ·  view source on GitHub ↗

<!-- description --> @brief Initializes this dVpT <!-- inputs/outputs --> @param gs the gs_t to use @param tls the tls_t to use @param sys the bf_syscall_t to use @param intrinsic the intrinsic_t to use @param i the ID for this dVpT

(
        &mut self,
        gs: &crate::GsT,
        tls: &crate::TlsT,
        sys: &syscall::BfSyscallT,
        intrinsic: &crate::IntrinsicT,
        i: bsl::SafeU16,
    )

Source from the content-addressed store, hash-verified

55 /// @param i the ID for this dVpT
56 ///
57 pub fn initialize(
58 &mut self,
59 gs: &crate::GsT,
60 tls: &crate::TlsT,
61 sys: &syscall::BfSyscallT,
62 intrinsic: &crate::IntrinsicT,
63 i: bsl::SafeU16,
64 ) {
65 bsl::expects(self.id() == syscall::BF_INVALID_ID);
66 bsl::expects(self.m_allocated == crate::AllocatedStatusT::Deallocated);
67
68 bsl::expects(i.is_valid_and_checked());
69 bsl::expects(i != syscall::BF_INVALID_ID);
70
71 bsl::discard(gs);
72 bsl::discard(tls);
73 bsl::discard(sys);
74 bsl::discard(intrinsic);
75
76 self.m_id = !i;
77 }
78
79 /// <!-- description -->
80 /// @brief Release the dVpT.

Callers 1

ext_main_entryFunction · 0.45

Calls 1

idMethod · 0.45

Tested by

no test coverage detected