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
19
libstd_real/libc/src/funcs.rs
Normal file
19
libstd_real/libc/src/funcs.rs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
use super::{c_char, size_t};
|
||||
|
||||
pub unsafe extern fn strlen(ptr: *const c_char) -> size_t {
|
||||
let mut i: size_t = 0;
|
||||
while *ptr.offset(i as isize) != 0 {
|
||||
i += 1;
|
||||
}
|
||||
i
|
||||
}
|
||||
|
||||
pub unsafe extern fn random() -> u64 {
|
||||
let rand;
|
||||
asm!("rdrand rax"
|
||||
: "={rax}"(rand)
|
||||
:
|
||||
:
|
||||
: "intel", "volatile");
|
||||
rand
|
||||
}
|
||||
Loading…
Reference in a new issue