Started to implement syscall.rs
This commit is contained in:
@ -65,7 +65,7 @@ __start:
|
||||
|
||||
.globl Halt
|
||||
.type __Halt, @function
|
||||
Halt:
|
||||
Shutdown:
|
||||
addi a7,zero,SC_HALT
|
||||
ecall
|
||||
jr ra
|
||||
|
21
test/userlib/syscall.rs
Normal file
21
test/userlib/syscall.rs
Normal file
@ -0,0 +1,21 @@
|
||||
pub struct Burritos_Time {
|
||||
seconds: i64,
|
||||
nanos: i64
|
||||
}
|
||||
pub struct ThreadId{
|
||||
id: u64
|
||||
}
|
||||
pub struct t_error{
|
||||
t: i32
|
||||
}
|
||||
extern "C"{
|
||||
fn Shutdown() -> ();
|
||||
fn SysTime(t: Burritos_Time) -> ();
|
||||
fn Exit(status: i32) -> ();
|
||||
fn Exec(name: String) -> ThreadId;
|
||||
fn newThread(debug_name: String, func: i32, arg: i32) -> ThreadId;
|
||||
fn Join (id: ThreadId) -> t_error;
|
||||
fn Yield() -> ();
|
||||
fn Perror(mess: String) -> ();
|
||||
|
||||
}
|
Reference in New Issue
Block a user