From a10926df76c7ea7949a3bd798215fc4b93ef120d Mon Sep 17 00:00:00 2001 From: Stephen Marz Date: Sat, 12 Oct 2019 21:33:27 -0400 Subject: [PATCH] Change C++ to Rust --- risc_v/ch4/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/risc_v/ch4/src/lib.rs b/risc_v/ch4/src/lib.rs index fc329cb..8a12f1d 100755 --- a/risc_v/ch4/src/lib.rs +++ b/risc_v/ch4/src/lib.rs @@ -301,6 +301,7 @@ extern "C" fn kmain() { unsafe { let val = 0x0200_0000 as *mut u32; val.write_volatile(1); + asm!("ecall"); } // If we get here, the Box, vec, and String should all be freed since // they go out of scope. This calls their "Drop" trait.