semx_processor 0.1.1

对应处理器相关的操作
Documentation
//! 处理器相关操作
#![no_std]
#![allow(unsafe_code)]
#![cfg_attr(target_arch = "aarch64", feature(stdarch_arm_hints))]

cfg_if::cfg_if! {
    if #[cfg(target_arch = "aarch64")] {
        mod aarch64;
        use aarch64::*;
    } else {
        mod noop;
        use noop::*;
    }
}

/// 获取当前 cpu 自定义 id
#[inline(always)]
pub fn this_processor_id() -> usize {
    arch_my_processor_id()
}

/// 设置当前 cpu 自定义 id
#[inline(always)]
pub fn set_this_processor_id(id: usize) {
    arch_set_my_processor_id(id);
}

/// do cpu relax
#[inline(always)]
pub fn cpu_relax() {
    arch_cpu_relax();
}