Skip to content

Commit

Permalink
handle doc check
Browse files Browse the repository at this point in the history
  • Loading branch information
thesayol committed Jul 8, 2024
1 parent 8a20a58 commit c8bf0d2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions modules/ruxhal/src/trap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ pub trait TrapHandler {
fn handle_page_fault(_vaddr: usize, _caus: PageFaultCause) -> bool {
panic!("No handle_page_fault implement");
}
/// Handles signal for every trap.
#[cfg(feature = "signal")]
fn handle_signal() {
panic!("No handle_page_fault implement");
Expand Down
2 changes: 1 addition & 1 deletion modules/ruxruntime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ virtio-9p = ["fs", "rux9p"]
net-9p = ["fs", "rux9p"]
net = ["ruxdriver", "ruxnet"]
display = ["ruxdriver", "ruxdisplay"]
signal = []
signal = ["ruxhal/signal"]

musl = ["dep:ruxfutex"]

Expand Down
2 changes: 2 additions & 0 deletions modules/ruxruntime/src/signal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,12 @@ static mut SIGNAL_IF: Signal = Signal {
timer_interval: [Duration::from_nanos(0); 3],
};

#[cfg(feature = "signal")]
struct SignalHandler;

#[impl_interface]
impl TrapHandler for SignalHandler {
#[cfg(feature = "signal")]
fn handle_signal() {
let signal = Signal::signal(-1, true).unwrap();
for signum in 0..32 {
Expand Down

0 comments on commit c8bf0d2

Please sign in to comment.