Skip to content

Commit

Permalink
add some boilerplate code for rv32i
Browse files Browse the repository at this point in the history
  • Loading branch information
enjhnsn2 authored and Samir-Rashid committed Jul 15, 2024
1 parent 943e708 commit 21ccbbc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/rv32i/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ use kernel::utilities::registers::interfaces::{Readable, Writeable};
pub mod clic;
pub mod machine_timer;
pub mod pmp;
#[flux::ignore]
pub mod support;
#[flux::ignore]
pub mod syscall;

// Re-export the shared CSR library so that dependent crates do not have to have
Expand Down
1 change: 1 addition & 0 deletions arch/rv32i/src/support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pub unsafe fn wfi() {
asm!("wfi", options(nomem, nostack));
}

#[flux::trusted]
pub unsafe fn atomic<F, R>(f: F) -> R
where
F: FnOnce() -> R,
Expand Down

0 comments on commit 21ccbbc

Please sign in to comment.