@@ -7,8 +7,10 @@ use hashbrown::HashMap;
77use hermit_sync:: { InterruptSpinMutex , InterruptTicketMutex } ;
88pub use x86_64:: instructions:: interrupts:: { disable, enable, enable_and_hlt as enable_and_wait} ;
99use x86_64:: set_general_handler;
10+ #[ cfg( any( feature = "fuse" , feature = "tcp" , feature = "udp" ) ) ]
11+ use x86_64:: structures:: idt;
12+ use x86_64:: structures:: idt:: InterruptDescriptorTable ;
1013pub use x86_64:: structures:: idt:: InterruptStackFrame as ExceptionStackFrame ;
11- use x86_64:: structures:: idt:: { self , InterruptDescriptorTable } ;
1214
1315use crate :: arch:: x86_64:: kernel:: core_local:: { core_scheduler, increment_irq_counter} ;
1416use crate :: arch:: x86_64:: kernel:: { apic, processor} ;
@@ -108,8 +110,8 @@ pub(crate) fn install() {
108110 IRQ_NAMES . lock ( ) . insert ( 7 , "FPU" ) ;
109111}
110112
111- #[ no_mangle ]
112- pub extern "C" fn irq_install_handler ( irq_number : u8 , handler : idt:: HandlerFunc ) {
113+ #[ cfg ( any ( feature = "fuse" , feature = "tcp" , feature = "udp" ) ) ]
114+ pub fn irq_install_handler ( irq_number : u8 , handler : idt:: HandlerFunc ) {
113115 debug ! ( "Install handler for interrupt {}" , irq_number) ;
114116
115117 let mut idt = IDT . lock ( ) ;
0 commit comments