aboutsummaryrefslogtreecommitdiffstats
path: root/halt/src/main.rs
blob: 8abf38aa65bf85bb686860f3fd7da2c10da529c0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#![no_std]
#![no_main]
#![feature(start)]
//#![feature(asm)]
//#![link_args = "-L -lmain"]

#[panic_handler]
fn panic(_info: &core::panic::PanicInfo) -> ! {
    loop {}
}

#[no_mangle]
pub unsafe extern "C" fn main() {
    exit(0x69);
}

#[link(name="pintos", kind="static")]
extern {
    fn exit(status: i32);
}

//#[no_mangle]
//#[start]
//unsafe extern "C" fn _start() {
//    exit(main());
//}