Lines Matching defs:CpuId
35 /// use kernel::cpu::CpuId;
40 /// let id = unsafe { CpuId::from_u32_unchecked(cpu) };
43 /// assert!(CpuId::from_i32(0).is_some());
44 /// assert!(CpuId::from_i32(-1).is_none());
47 pub struct CpuId(u32);
49 impl CpuId {
50 /// Creates a new [`CpuId`] from the given `id` without checking bounds.
64 /// Creates a new [`CpuId`] from the given `id`, checking that it is valid.
74 /// Creates a new [`CpuId`] from the given `id` without checking bounds.
90 /// Creates a new [`CpuId`] from the given `id`, checking that it is valid.
119 impl From<CpuId> for u32 {
120 fn from(id: CpuId) -> Self {
125 impl From<CpuId> for i32 {
126 fn from(id: CpuId) -> Self {
142 pub unsafe fn from_cpu(cpu: CpuId) -> Result<&'static Device> {