Skip to content

Commit 1a93932

Browse files
gaojiaqi7jyao1
authored andcommitted
td-exception: public InterruptCallback::new
`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]>
1 parent eaacaf2 commit 1a93932

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

td-exception/src/interrupt.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ pub struct InterruptCallback {
9898
}
9999

100100
impl InterruptCallback {
101-
const fn new(func: fn(&mut InterruptStack)) -> Self {
101+
pub const fn new(func: fn(&mut InterruptStack)) -> Self {
102102
InterruptCallback { func }
103103
}
104104
}

td-payload/src/arch/x86_64/idt.rs

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// SPDX-License-Identifier: BSD-2-Clause-Patent
44

55
pub use td_exception::idt::*;
6+
pub use td_exception::interrupt::*;
67

78
pub const PAGE_FAULT_EXCEPTION: u8 = 14;
89
pub const PAGE_FAULT_IST: u8 = 1;

0 commit comments

Comments
 (0)