@@ -100,7 +100,7 @@ pub fn send_eoi_to_master() {
100100// 6: Invalid Opcode Exception
101101// 7: Coprocessor Not Available Exception
102102
103- extern "x86-interrupt" fn divide_by_zero_exception ( stack_frame : & mut ExceptionStackFrame ) {
103+ extern "x86-interrupt" fn divide_by_zero_exception ( stack_frame : ExceptionStackFrame ) {
104104 info ! (
105105 "Task {} receive a Divide By Zero Exception: {:#?}" ,
106106 get_current_taskid( ) ,
@@ -110,7 +110,7 @@ extern "x86-interrupt" fn divide_by_zero_exception(stack_frame: &mut ExceptionSt
110110 abort ( ) ;
111111}
112112
113- extern "x86-interrupt" fn debug_exception ( stack_frame : & mut ExceptionStackFrame ) {
113+ extern "x86-interrupt" fn debug_exception ( stack_frame : ExceptionStackFrame ) {
114114 info ! (
115115 "Task {} receive a Debug Exception: {:#?}" ,
116116 get_current_taskid( ) ,
@@ -120,7 +120,7 @@ extern "x86-interrupt" fn debug_exception(stack_frame: &mut ExceptionStackFrame)
120120 abort ( ) ;
121121}
122122
123- extern "x86-interrupt" fn nmi_exception ( stack_frame : & mut ExceptionStackFrame ) {
123+ extern "x86-interrupt" fn nmi_exception ( stack_frame : ExceptionStackFrame ) {
124124 info ! (
125125 "Task {} receive a Non Maskable Interrupt Exception: {:#?}" ,
126126 get_current_taskid( ) ,
@@ -130,7 +130,7 @@ extern "x86-interrupt" fn nmi_exception(stack_frame: &mut ExceptionStackFrame) {
130130 abort ( ) ;
131131}
132132
133- extern "x86-interrupt" fn int3_exception ( stack_frame : & mut ExceptionStackFrame ) {
133+ extern "x86-interrupt" fn int3_exception ( stack_frame : ExceptionStackFrame ) {
134134 info ! (
135135 "Task {} receive a Int 3 Exception: {:#?}" ,
136136 get_current_taskid( ) ,
@@ -140,7 +140,7 @@ extern "x86-interrupt" fn int3_exception(stack_frame: &mut ExceptionStackFrame)
140140 abort ( ) ;
141141}
142142
143- extern "x86-interrupt" fn int0_exception ( stack_frame : & mut ExceptionStackFrame ) {
143+ extern "x86-interrupt" fn int0_exception ( stack_frame : ExceptionStackFrame ) {
144144 info ! (
145145 "Task {} receive a INT0 Exception: {:#?}" ,
146146 get_current_taskid( ) ,
@@ -150,7 +150,7 @@ extern "x86-interrupt" fn int0_exception(stack_frame: &mut ExceptionStackFrame)
150150 abort ( ) ;
151151}
152152
153- extern "x86-interrupt" fn out_of_bound_exception ( stack_frame : & mut ExceptionStackFrame ) {
153+ extern "x86-interrupt" fn out_of_bound_exception ( stack_frame : ExceptionStackFrame ) {
154154 info ! (
155155 "Task {} receive a Out of Bounds Exception: {:#?}" ,
156156 get_current_taskid( ) ,
@@ -160,7 +160,7 @@ extern "x86-interrupt" fn out_of_bound_exception(stack_frame: &mut ExceptionStac
160160 abort ( ) ;
161161}
162162
163- extern "x86-interrupt" fn invalid_opcode_exception ( stack_frame : & mut ExceptionStackFrame ) {
163+ extern "x86-interrupt" fn invalid_opcode_exception ( stack_frame : ExceptionStackFrame ) {
164164 info ! (
165165 "Task {} receive a Invalid Opcode Exception: {:#?}" ,
166166 get_current_taskid( ) ,
@@ -170,7 +170,7 @@ extern "x86-interrupt" fn invalid_opcode_exception(stack_frame: &mut ExceptionSt
170170 abort ( ) ;
171171}
172172
173- extern "x86-interrupt" fn no_coprocessor_exception ( stack_frame : & mut ExceptionStackFrame ) {
173+ extern "x86-interrupt" fn no_coprocessor_exception ( stack_frame : ExceptionStackFrame ) {
174174 info ! (
175175 "Task {} receive a Coprocessor Not Available Exception: {:#?}" ,
176176 get_current_taskid( ) ,
@@ -183,7 +183,7 @@ extern "x86-interrupt" fn no_coprocessor_exception(stack_frame: &mut ExceptionSt
183183// 8: Double Fault Exception (With Error Code!)
184184
185185extern "x86-interrupt" fn double_fault_exception (
186- stack_frame : & mut ExceptionStackFrame ,
186+ stack_frame : ExceptionStackFrame ,
187187 error_code : u64 ,
188188) {
189189 info ! (
@@ -198,7 +198,7 @@ extern "x86-interrupt" fn double_fault_exception(
198198
199199// 9: Coprocessor Segment Overrun Exception
200200
201- extern "x86-interrupt" fn overrun_exception ( stack_frame : & mut ExceptionStackFrame ) {
201+ extern "x86-interrupt" fn overrun_exception ( stack_frame : ExceptionStackFrame ) {
202202 info ! (
203203 "Task {} receive a Coprocessor Segment Overrun Exception: {:#?}" ,
204204 get_current_taskid( ) ,
@@ -215,7 +215,7 @@ extern "x86-interrupt" fn overrun_exception(stack_frame: &mut ExceptionStackFram
215215// 14: Page Fault Exception (With Error Code!)
216216
217217extern "x86-interrupt" fn bad_tss_exception (
218- stack_frame : & mut ExceptionStackFrame ,
218+ stack_frame : ExceptionStackFrame ,
219219 error_code : u64 ,
220220) {
221221 info ! (
@@ -229,7 +229,7 @@ extern "x86-interrupt" fn bad_tss_exception(
229229}
230230
231231extern "x86-interrupt" fn not_present_exception (
232- stack_frame : & mut ExceptionStackFrame ,
232+ stack_frame : ExceptionStackFrame ,
233233 error_code : u64 ,
234234) {
235235 info ! (
@@ -243,7 +243,7 @@ extern "x86-interrupt" fn not_present_exception(
243243}
244244
245245extern "x86-interrupt" fn stack_fault_exception (
246- stack_frame : & mut ExceptionStackFrame ,
246+ stack_frame : ExceptionStackFrame ,
247247 error_code : u64 ,
248248) {
249249 info ! (
@@ -257,7 +257,7 @@ extern "x86-interrupt" fn stack_fault_exception(
257257}
258258
259259extern "x86-interrupt" fn general_protection_exception (
260- stack_frame : & mut ExceptionStackFrame ,
260+ stack_frame : ExceptionStackFrame ,
261261 error_code : u64 ,
262262) {
263263 info ! (
@@ -276,7 +276,7 @@ extern "x86-interrupt" fn general_protection_exception(
276276// 18: Machine Check Exception
277277// 19-31: Reserved
278278
279- extern "x86-interrupt" fn floating_point_exception ( stack_frame : & mut ExceptionStackFrame ) {
279+ extern "x86-interrupt" fn floating_point_exception ( stack_frame : ExceptionStackFrame ) {
280280 info ! (
281281 "Task {} receive a Floating Point Exception: {:#?}" ,
282282 get_current_taskid( ) ,
@@ -286,7 +286,7 @@ extern "x86-interrupt" fn floating_point_exception(stack_frame: &mut ExceptionSt
286286 abort ( ) ;
287287}
288288
289- extern "x86-interrupt" fn alignment_check_exception ( stack_frame : & mut ExceptionStackFrame ) {
289+ extern "x86-interrupt" fn alignment_check_exception ( stack_frame : ExceptionStackFrame ) {
290290 info ! (
291291 "Task {} receive a Alignment Check Exception: {:#?}" ,
292292 get_current_taskid( ) ,
@@ -296,7 +296,7 @@ extern "x86-interrupt" fn alignment_check_exception(stack_frame: &mut ExceptionS
296296 abort ( ) ;
297297}
298298
299- extern "x86-interrupt" fn machine_check_exception ( stack_frame : & mut ExceptionStackFrame ) {
299+ extern "x86-interrupt" fn machine_check_exception ( stack_frame : ExceptionStackFrame ) {
300300 info ! (
301301 "Task {} receive a Machine Check Exception: {:#?}" ,
302302 get_current_taskid( ) ,
@@ -306,7 +306,7 @@ extern "x86-interrupt" fn machine_check_exception(stack_frame: &mut ExceptionSta
306306 abort ( ) ;
307307}
308308
309- extern "x86-interrupt" fn reserved_exception ( stack_frame : & mut ExceptionStackFrame ) {
309+ extern "x86-interrupt" fn reserved_exception ( stack_frame : ExceptionStackFrame ) {
310310 info ! (
311311 "Task {} receive a reserved exception: {:#?}" ,
312312 get_current_taskid( ) ,
@@ -316,7 +316,7 @@ extern "x86-interrupt" fn reserved_exception(stack_frame: &mut ExceptionStackFra
316316 abort ( ) ;
317317}
318318
319- extern "x86-interrupt" fn unhandled_irq1 ( stack_frame : & mut ExceptionStackFrame ) {
319+ extern "x86-interrupt" fn unhandled_irq1 ( stack_frame : ExceptionStackFrame ) {
320320 info ! (
321321 "Task {} receive unknown interrupt: {:#?}" ,
322322 get_current_taskid( ) ,
@@ -326,7 +326,7 @@ extern "x86-interrupt" fn unhandled_irq1(stack_frame: &mut ExceptionStackFrame)
326326 abort ( ) ;
327327}
328328
329- extern "x86-interrupt" fn unhandled_irq2 ( stack_frame : & mut ExceptionStackFrame ) {
329+ extern "x86-interrupt" fn unhandled_irq2 ( stack_frame : ExceptionStackFrame ) {
330330 info ! (
331331 "Task {} receive unknown interrupt: {:#?}" ,
332332 get_current_taskid( ) ,
@@ -337,7 +337,7 @@ extern "x86-interrupt" fn unhandled_irq2(stack_frame: &mut ExceptionStackFrame)
337337 abort ( ) ;
338338}
339339
340- extern "x86-interrupt" fn timer_handler ( stack_frame : & mut ExceptionStackFrame ) {
340+ extern "x86-interrupt" fn timer_handler ( stack_frame : ExceptionStackFrame ) {
341341 debug ! (
342342 "Task {} receive timer interrupt!\n {:#?}" ,
343343 get_current_taskid( ) ,
@@ -443,7 +443,7 @@ impl InteruptHandler {
443443 pub fn add_handler (
444444 & mut self ,
445445 int_no : usize ,
446- func : extern "x86-interrupt" fn ( & mut ExceptionStackFrame ) ,
446+ func : extern "x86-interrupt" fn ( ExceptionStackFrame ) ,
447447 ) {
448448 if int_no < IDT_ENTRIES {
449449 self . idt [ int_no] = IdtEntry :: new (
0 commit comments