Bump to rust nightly-2022-01-01, feature global_asm,asm->stable
This commit is contained in:
parent
45280db169
commit
48109c34d0
8 changed files with 16 additions and 10 deletions
|
@ -1,7 +1,5 @@
|
|||
#![no_std]
|
||||
#![no_main]
|
||||
#![feature(global_asm)]
|
||||
#![feature(asm)]
|
||||
#![feature(panic_info_message)]
|
||||
#![feature(alloc_error_handler)]
|
||||
|
||||
|
@ -24,6 +22,8 @@ mod sync;
|
|||
mod mm;
|
||||
mod fs;
|
||||
|
||||
use core::arch::global_asm;
|
||||
|
||||
global_asm!(include_str!("entry.asm"));
|
||||
global_asm!(include_str!("link_app.S"));
|
||||
|
||||
|
@ -54,4 +54,4 @@ pub fn rust_main() -> ! {
|
|||
loader::list_apps();
|
||||
task::run_tasks();
|
||||
panic!("Unreachable in rust_main!");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ use crate::config::{
|
|||
TRAP_CONTEXT,
|
||||
USER_STACK_SIZE
|
||||
};
|
||||
use core::arch::asm;
|
||||
|
||||
extern "C" {
|
||||
fn stext();
|
||||
|
@ -341,4 +342,4 @@ pub fn remap_test() {
|
|||
false,
|
||||
);
|
||||
println!("remap_test passed!");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#![allow(unused)]
|
||||
|
||||
use core::arch::asm;
|
||||
|
||||
const SBI_SET_TIMER: usize = 0;
|
||||
const SBI_CONSOLE_PUTCHAR: usize = 1;
|
||||
const SBI_CONSOLE_GETCHAR: usize = 2;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
global_asm!(include_str!("switch.S"));
|
||||
|
||||
use super::TaskContext;
|
||||
use core::arch::global_asm;
|
||||
|
||||
global_asm!(include_str!("switch.S"));
|
||||
|
||||
extern "C" {
|
||||
pub fn __switch(
|
||||
|
|
|
@ -21,6 +21,7 @@ use crate::task::{
|
|||
};
|
||||
use crate::timer::set_next_trigger;
|
||||
use crate::config::{TRAP_CONTEXT, TRAMPOLINE};
|
||||
use core::arch::{global_asm, asm};
|
||||
|
||||
global_asm!(include_str!("trap.S"));
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
nightly-2021-12-15
|
||||
nightly-2022-01-01
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#![no_std]
|
||||
#![feature(asm)]
|
||||
#![feature(linkage)]
|
||||
#![feature(panic_info_message)]
|
||||
#![feature(alloc_error_handler)]
|
||||
|
@ -76,4 +75,4 @@ pub fn sleep(period_ms: usize) {
|
|||
while sys_get_time() < start + period_ms as isize {
|
||||
sys_yield();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
use core::arch::asm;
|
||||
|
||||
const SYSCALL_CLOSE: usize = 57;
|
||||
const SYSCALL_PIPE: usize = 59;
|
||||
const SYSCALL_READ: usize = 63;
|
||||
|
@ -67,4 +69,4 @@ pub fn sys_exec(path: &str) -> isize {
|
|||
|
||||
pub fn sys_waitpid(pid: isize, exit_code: *mut i32) -> isize {
|
||||
syscall(SYSCALL_WAITPID, [pid as usize, exit_code as usize, 0])
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue