Merge branch 'misc-fixes' into 'aarch64-rebase'

Misc fixes

See merge request redox-os/kernel!160
This commit is contained in:
Jeremy Soller
2021-01-15 19:43:23 +00:00
2 changed files with 3 additions and 1 deletions

View File

@@ -49,7 +49,7 @@ pub unsafe fn halt() {
/// Safe because it is similar to a NOP, and has no memory effects
#[inline(always)]
pub fn pause() {
unsafe { llvm_asm!("wfi") };
unsafe { llvm_asm!("nop") };
}
pub fn available_irqs_iter(cpu_id: usize) -> impl Iterator<Item = u8> + 'static {

View File

@@ -239,6 +239,8 @@ impl Context {
llvm_asm!("mov $0, sp" : "=r"(self.sp) : : "memory" : "volatile");
llvm_asm!("mov sp, $0" : : "r"(next.sp) : "memory" : "volatile");
CONTEXT_SWITCH_LOCK.store(false, Ordering::SeqCst);
}
}