Add syscall module

This commit is contained in:
Jeremy Soller 2016-08-14 15:58:35 -06:00
parent 29b6544d8f
commit a490ff13ae
4 changed files with 138 additions and 0 deletions

View file

@ -65,6 +65,7 @@
//! In this case, it is recommended to add one page, 4096 bytes, to the buffer and retry.
#![feature(lang_items)]
#![feature(question_mark)]
#![no_std]
#[macro_use]
@ -85,6 +86,9 @@ extern crate arch_x86_64 as arch;
/// Intrinsics for panic handling
pub mod panic;
/// Syscall handlers
pub mod syscall;
/// Tests
#[cfg(test)]
pub mod tests;
@ -93,6 +97,8 @@ pub mod tests;
pub extern fn kmain() {
println!("TEST");
println!("{:?}", syscall::open(b"file:/test/file", 0));
unsafe { set_interrupts() };
loop {
unsafe { halt() };