@@ -100,7 +100,7 @@ pub fn send_eoi_to_master() {
100
100
// 6: Invalid Opcode Exception
101
101
// 7: Coprocessor Not Available Exception
102
102
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 ) {
104
104
info ! (
105
105
"Task {} receive a Divide By Zero Exception: {:#?}" ,
106
106
get_current_taskid( ) ,
@@ -110,7 +110,7 @@ extern "x86-interrupt" fn divide_by_zero_exception(stack_frame: &mut ExceptionSt
110
110
abort ( ) ;
111
111
}
112
112
113
- extern "x86-interrupt" fn debug_exception ( stack_frame : & mut ExceptionStackFrame ) {
113
+ extern "x86-interrupt" fn debug_exception ( stack_frame : ExceptionStackFrame ) {
114
114
info ! (
115
115
"Task {} receive a Debug Exception: {:#?}" ,
116
116
get_current_taskid( ) ,
@@ -120,7 +120,7 @@ extern "x86-interrupt" fn debug_exception(stack_frame: &mut ExceptionStackFrame)
120
120
abort ( ) ;
121
121
}
122
122
123
- extern "x86-interrupt" fn nmi_exception ( stack_frame : & mut ExceptionStackFrame ) {
123
+ extern "x86-interrupt" fn nmi_exception ( stack_frame : ExceptionStackFrame ) {
124
124
info ! (
125
125
"Task {} receive a Non Maskable Interrupt Exception: {:#?}" ,
126
126
get_current_taskid( ) ,
@@ -130,7 +130,7 @@ extern "x86-interrupt" fn nmi_exception(stack_frame: &mut ExceptionStackFrame) {
130
130
abort ( ) ;
131
131
}
132
132
133
- extern "x86-interrupt" fn int3_exception ( stack_frame : & mut ExceptionStackFrame ) {
133
+ extern "x86-interrupt" fn int3_exception ( stack_frame : ExceptionStackFrame ) {
134
134
info ! (
135
135
"Task {} receive a Int 3 Exception: {:#?}" ,
136
136
get_current_taskid( ) ,
@@ -140,7 +140,7 @@ extern "x86-interrupt" fn int3_exception(stack_frame: &mut ExceptionStackFrame)
140
140
abort ( ) ;
141
141
}
142
142
143
- extern "x86-interrupt" fn int0_exception ( stack_frame : & mut ExceptionStackFrame ) {
143
+ extern "x86-interrupt" fn int0_exception ( stack_frame : ExceptionStackFrame ) {
144
144
info ! (
145
145
"Task {} receive a INT0 Exception: {:#?}" ,
146
146
get_current_taskid( ) ,
@@ -150,7 +150,7 @@ extern "x86-interrupt" fn int0_exception(stack_frame: &mut ExceptionStackFrame)
150
150
abort ( ) ;
151
151
}
152
152
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 ) {
154
154
info ! (
155
155
"Task {} receive a Out of Bounds Exception: {:#?}" ,
156
156
get_current_taskid( ) ,
@@ -160,7 +160,7 @@ extern "x86-interrupt" fn out_of_bound_exception(stack_frame: &mut ExceptionStac
160
160
abort ( ) ;
161
161
}
162
162
163
- extern "x86-interrupt" fn invalid_opcode_exception ( stack_frame : & mut ExceptionStackFrame ) {
163
+ extern "x86-interrupt" fn invalid_opcode_exception ( stack_frame : ExceptionStackFrame ) {
164
164
info ! (
165
165
"Task {} receive a Invalid Opcode Exception: {:#?}" ,
166
166
get_current_taskid( ) ,
@@ -170,7 +170,7 @@ extern "x86-interrupt" fn invalid_opcode_exception(stack_frame: &mut ExceptionSt
170
170
abort ( ) ;
171
171
}
172
172
173
- extern "x86-interrupt" fn no_coprocessor_exception ( stack_frame : & mut ExceptionStackFrame ) {
173
+ extern "x86-interrupt" fn no_coprocessor_exception ( stack_frame : ExceptionStackFrame ) {
174
174
info ! (
175
175
"Task {} receive a Coprocessor Not Available Exception: {:#?}" ,
176
176
get_current_taskid( ) ,
@@ -183,7 +183,7 @@ extern "x86-interrupt" fn no_coprocessor_exception(stack_frame: &mut ExceptionSt
183
183
// 8: Double Fault Exception (With Error Code!)
184
184
185
185
extern "x86-interrupt" fn double_fault_exception (
186
- stack_frame : & mut ExceptionStackFrame ,
186
+ stack_frame : ExceptionStackFrame ,
187
187
error_code : u64 ,
188
188
) {
189
189
info ! (
@@ -198,7 +198,7 @@ extern "x86-interrupt" fn double_fault_exception(
198
198
199
199
// 9: Coprocessor Segment Overrun Exception
200
200
201
- extern "x86-interrupt" fn overrun_exception ( stack_frame : & mut ExceptionStackFrame ) {
201
+ extern "x86-interrupt" fn overrun_exception ( stack_frame : ExceptionStackFrame ) {
202
202
info ! (
203
203
"Task {} receive a Coprocessor Segment Overrun Exception: {:#?}" ,
204
204
get_current_taskid( ) ,
@@ -215,7 +215,7 @@ extern "x86-interrupt" fn overrun_exception(stack_frame: &mut ExceptionStackFram
215
215
// 14: Page Fault Exception (With Error Code!)
216
216
217
217
extern "x86-interrupt" fn bad_tss_exception (
218
- stack_frame : & mut ExceptionStackFrame ,
218
+ stack_frame : ExceptionStackFrame ,
219
219
error_code : u64 ,
220
220
) {
221
221
info ! (
@@ -229,7 +229,7 @@ extern "x86-interrupt" fn bad_tss_exception(
229
229
}
230
230
231
231
extern "x86-interrupt" fn not_present_exception (
232
- stack_frame : & mut ExceptionStackFrame ,
232
+ stack_frame : ExceptionStackFrame ,
233
233
error_code : u64 ,
234
234
) {
235
235
info ! (
@@ -243,7 +243,7 @@ extern "x86-interrupt" fn not_present_exception(
243
243
}
244
244
245
245
extern "x86-interrupt" fn stack_fault_exception (
246
- stack_frame : & mut ExceptionStackFrame ,
246
+ stack_frame : ExceptionStackFrame ,
247
247
error_code : u64 ,
248
248
) {
249
249
info ! (
@@ -257,7 +257,7 @@ extern "x86-interrupt" fn stack_fault_exception(
257
257
}
258
258
259
259
extern "x86-interrupt" fn general_protection_exception (
260
- stack_frame : & mut ExceptionStackFrame ,
260
+ stack_frame : ExceptionStackFrame ,
261
261
error_code : u64 ,
262
262
) {
263
263
info ! (
@@ -276,7 +276,7 @@ extern "x86-interrupt" fn general_protection_exception(
276
276
// 18: Machine Check Exception
277
277
// 19-31: Reserved
278
278
279
- extern "x86-interrupt" fn floating_point_exception ( stack_frame : & mut ExceptionStackFrame ) {
279
+ extern "x86-interrupt" fn floating_point_exception ( stack_frame : ExceptionStackFrame ) {
280
280
info ! (
281
281
"Task {} receive a Floating Point Exception: {:#?}" ,
282
282
get_current_taskid( ) ,
@@ -286,7 +286,7 @@ extern "x86-interrupt" fn floating_point_exception(stack_frame: &mut ExceptionSt
286
286
abort ( ) ;
287
287
}
288
288
289
- extern "x86-interrupt" fn alignment_check_exception ( stack_frame : & mut ExceptionStackFrame ) {
289
+ extern "x86-interrupt" fn alignment_check_exception ( stack_frame : ExceptionStackFrame ) {
290
290
info ! (
291
291
"Task {} receive a Alignment Check Exception: {:#?}" ,
292
292
get_current_taskid( ) ,
@@ -296,7 +296,7 @@ extern "x86-interrupt" fn alignment_check_exception(stack_frame: &mut ExceptionS
296
296
abort ( ) ;
297
297
}
298
298
299
- extern "x86-interrupt" fn machine_check_exception ( stack_frame : & mut ExceptionStackFrame ) {
299
+ extern "x86-interrupt" fn machine_check_exception ( stack_frame : ExceptionStackFrame ) {
300
300
info ! (
301
301
"Task {} receive a Machine Check Exception: {:#?}" ,
302
302
get_current_taskid( ) ,
@@ -306,7 +306,7 @@ extern "x86-interrupt" fn machine_check_exception(stack_frame: &mut ExceptionSta
306
306
abort ( ) ;
307
307
}
308
308
309
- extern "x86-interrupt" fn reserved_exception ( stack_frame : & mut ExceptionStackFrame ) {
309
+ extern "x86-interrupt" fn reserved_exception ( stack_frame : ExceptionStackFrame ) {
310
310
info ! (
311
311
"Task {} receive a reserved exception: {:#?}" ,
312
312
get_current_taskid( ) ,
@@ -316,7 +316,7 @@ extern "x86-interrupt" fn reserved_exception(stack_frame: &mut ExceptionStackFra
316
316
abort ( ) ;
317
317
}
318
318
319
- extern "x86-interrupt" fn unhandled_irq1 ( stack_frame : & mut ExceptionStackFrame ) {
319
+ extern "x86-interrupt" fn unhandled_irq1 ( stack_frame : ExceptionStackFrame ) {
320
320
info ! (
321
321
"Task {} receive unknown interrupt: {:#?}" ,
322
322
get_current_taskid( ) ,
@@ -326,7 +326,7 @@ extern "x86-interrupt" fn unhandled_irq1(stack_frame: &mut ExceptionStackFrame)
326
326
abort ( ) ;
327
327
}
328
328
329
- extern "x86-interrupt" fn unhandled_irq2 ( stack_frame : & mut ExceptionStackFrame ) {
329
+ extern "x86-interrupt" fn unhandled_irq2 ( stack_frame : ExceptionStackFrame ) {
330
330
info ! (
331
331
"Task {} receive unknown interrupt: {:#?}" ,
332
332
get_current_taskid( ) ,
@@ -337,7 +337,7 @@ extern "x86-interrupt" fn unhandled_irq2(stack_frame: &mut ExceptionStackFrame)
337
337
abort ( ) ;
338
338
}
339
339
340
- extern "x86-interrupt" fn timer_handler ( stack_frame : & mut ExceptionStackFrame ) {
340
+ extern "x86-interrupt" fn timer_handler ( stack_frame : ExceptionStackFrame ) {
341
341
debug ! (
342
342
"Task {} receive timer interrupt!\n {:#?}" ,
343
343
get_current_taskid( ) ,
@@ -443,7 +443,7 @@ impl InteruptHandler {
443
443
pub fn add_handler (
444
444
& mut self ,
445
445
int_no : usize ,
446
- func : extern "x86-interrupt" fn ( & mut ExceptionStackFrame ) ,
446
+ func : extern "x86-interrupt" fn ( ExceptionStackFrame ) ,
447
447
) {
448
448
if int_no < IDT_ENTRIES {
449
449
self . idt [ int_no] = IdtEntry :: new (
0 commit comments