pub unsafe fn from_cpu(cpu: u32) -> Result<&'static Device>
Expand description
Creates a new instance of CPU’s device.
§Safety
Reference counting is not implemented for the CPU device in the C code. When a CPU is hot-unplugged, the corresponding CPU device is unregistered, but its associated memory is not freed.
Callers must ensure that the CPU device is not used after it has been unregistered. This can be achieved, for example, by registering a CPU hotplug notifier and removing any references to the CPU device within the notifier’s callback.