Smp (#23)
* Fire up multiple processors * Use IPIs to wake up secondary processors * Much better exception information * Modifications to show more information on fault * WIP: Use real libstd * Add TLS (not complete) * Add random function, export getpid, cleanup * Do not spin APs until new context * Update rust * Update rust * Use rd/wrfsbase * Implement TLS * Implement compiler builtins and update rust * Update rust * Back to Redox libstd * Update rust
This commit is contained in:
parent
25dc44b348
commit
149b0297a4
1 changed files with 1119 additions and 378 deletions
|
|
@ -1,4 +1,4 @@
|
|||
use core::sync::atomic::{AtomicBool, ATOMIC_BOOL_INIT, Ordering};
|
||||
use core::sync::atomic::{AtomicBool, ATOMIC_BOOL_INIT};
|
||||
|
||||
/// This must be used by the kernel to ensure that context switches are done atomically
|
||||
/// Compare and exchange this to true when beginning a context switch on any CPU
|
||||
|
|
@ -106,13 +106,5 @@ impl Context {
|
|||
|
||||
asm!("mov $0, rbp" : "=r"(self.rbp) : : "memory" : "intel", "volatile");
|
||||
asm!("mov rbp, $0" : : "r"(next.rbp) : "memory" : "intel", "volatile");
|
||||
|
||||
asm!("call context_switch_unlock" : : : "memory" : "intel", "volatile");
|
||||
}
|
||||
}
|
||||
|
||||
/// Unset global lock, set inside of kernel
|
||||
#[no_mangle]
|
||||
pub extern fn context_switch_unlock(){
|
||||
CONTEXT_SWITCH_LOCK.store(false, Ordering::SeqCst);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue