#[repr(C)]pub struct MpRequest { /* private fields */ }Expand description
Request the start of all other cores on the system, if they exist. Without this request, non-bootstrap cores will be ignored.
§Usage
static BASE_REVISION: BaseRevision = BaseRevision::new();
// Request that all other cores be started
static MP_REQUEST: MpRequest = MpRequest::new();
// ...later, in our code
MP_REQUEST.get_response() // ...Implementations§
Source§impl MpRequest
impl MpRequest
Sourcepub const fn with_revision(revision: u64) -> Self
pub const fn with_revision(revision: u64) -> Self
Create a new request with the given revision.
Sourcepub fn id(&self) -> &[u64; 4]
pub fn id(&self) -> &[u64; 4]
Get the ID of this request. This includes the magic number and the request-specific ID.
Sourcepub fn get_response(&self) -> Option<&MpResponse>
pub fn get_response(&self) -> Option<&MpResponse>
Get the response to this request, if it has been set.
Sourcepub fn get_response_mut(&mut self) -> Option<&mut MpResponse>
pub fn get_response_mut(&mut self) -> Option<&mut MpResponse>
Get a mutable reference to the response to this request, if it has been set.
Note that this method takes a mutable reference, so the request will have to be wrapped in a mutex or similar in order to use it.
Sourcepub fn set_flags(&mut self, flags: impl Into<RequestFlags>)
pub fn set_flags(&mut self, flags: impl Into<RequestFlags>)
Set the MP request flags. See RequestFlags
for more information.
This function operates in place.
§Parameters
- flags: The new value for the field.
Sourcepub const fn with_flags(self, flags: RequestFlags) -> Self
pub const fn with_flags(self, flags: RequestFlags) -> Self
Set the MP request flags. See RequestFlags
for more information.
This function returns the new value.
§Parameters
- flags: The new value for the field.
Sourcepub fn flags(&self) -> RequestFlags
pub fn flags(&self) -> RequestFlags
Get the MP request flags. See RequestFlags for
more information.