Skip to content

Commit

Permalink
td-exception: public InterruptCallback::new
Browse files Browse the repository at this point in the history
`InterruptCallback::new` shall be set as pub to make it possible for
user of this crate to register callback via `register_interrupt_callback`.

Publicly use `td_exception::interrupt::*` in `td-payload` crate can help
reduce redundant references to the `td-exception` crate.

Signed-off-by: Jiaqi Gao <[email protected]>
  • Loading branch information
gaojiaqi7 authored and jyao1 committed Dec 26, 2024
1 parent eaacaf2 commit 1a93932
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion td-exception/src/interrupt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ pub struct InterruptCallback {
}

impl InterruptCallback {
const fn new(func: fn(&mut InterruptStack)) -> Self {
pub const fn new(func: fn(&mut InterruptStack)) -> Self {
InterruptCallback { func }
}
}
Expand Down
1 change: 1 addition & 0 deletions td-payload/src/arch/x86_64/idt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// SPDX-License-Identifier: BSD-2-Clause-Patent

pub use td_exception::idt::*;
pub use td_exception::interrupt::*;

pub const PAGE_FAULT_EXCEPTION: u8 = 14;
pub const PAGE_FAULT_IST: u8 = 1;
Expand Down

0 comments on commit 1a93932

Please sign in to comment.