@@ -99,7 +99,7 @@ fn send_eoi_to_master() {
99
99
// 6: Invalid Opcode Exception
100
100
// 7: Coprocessor Not Available Exception
101
101
102
- extern "x86-interrupt" fn divide_by_zero_exception ( stack_frame : & mut ExceptionStackFrame ) {
102
+ extern "x86-interrupt" fn divide_by_zero_exception ( stack_frame : ExceptionStackFrame ) {
103
103
info ! (
104
104
"Task {} receive a Divide By Zero Exception: {:#?}" ,
105
105
get_current_taskid( ) ,
@@ -109,7 +109,7 @@ extern "x86-interrupt" fn divide_by_zero_exception(stack_frame: &mut ExceptionSt
109
109
abort ( ) ;
110
110
}
111
111
112
- extern "x86-interrupt" fn debug_exception ( stack_frame : & mut ExceptionStackFrame ) {
112
+ extern "x86-interrupt" fn debug_exception ( stack_frame : ExceptionStackFrame ) {
113
113
info ! (
114
114
"Task {} receive a Debug Exception: {:#?}" ,
115
115
get_current_taskid( ) ,
@@ -119,7 +119,7 @@ extern "x86-interrupt" fn debug_exception(stack_frame: &mut ExceptionStackFrame)
119
119
abort ( ) ;
120
120
}
121
121
122
- extern "x86-interrupt" fn nmi_exception ( stack_frame : & mut ExceptionStackFrame ) {
122
+ extern "x86-interrupt" fn nmi_exception ( stack_frame : ExceptionStackFrame ) {
123
123
info ! (
124
124
"Task {} receive a Non Maskable Interrupt Exception: {:#?}" ,
125
125
get_current_taskid( ) ,
@@ -129,7 +129,7 @@ extern "x86-interrupt" fn nmi_exception(stack_frame: &mut ExceptionStackFrame) {
129
129
abort ( ) ;
130
130
}
131
131
132
- extern "x86-interrupt" fn int3_exception ( stack_frame : & mut ExceptionStackFrame ) {
132
+ extern "x86-interrupt" fn int3_exception ( stack_frame : ExceptionStackFrame ) {
133
133
info ! (
134
134
"Task {} receive a Int 3 Exception: {:#?}" ,
135
135
get_current_taskid( ) ,
@@ -139,7 +139,7 @@ extern "x86-interrupt" fn int3_exception(stack_frame: &mut ExceptionStackFrame)
139
139
abort ( ) ;
140
140
}
141
141
142
- extern "x86-interrupt" fn int0_exception ( stack_frame : & mut ExceptionStackFrame ) {
142
+ extern "x86-interrupt" fn int0_exception ( stack_frame : ExceptionStackFrame ) {
143
143
info ! (
144
144
"Task {} receive a INT0 Exception: {:#?}" ,
145
145
get_current_taskid( ) ,
@@ -149,7 +149,7 @@ extern "x86-interrupt" fn int0_exception(stack_frame: &mut ExceptionStackFrame)
149
149
abort ( ) ;
150
150
}
151
151
152
- extern "x86-interrupt" fn out_of_bound_exception ( stack_frame : & mut ExceptionStackFrame ) {
152
+ extern "x86-interrupt" fn out_of_bound_exception ( stack_frame : ExceptionStackFrame ) {
153
153
info ! (
154
154
"Task {} receive a Out of Bounds Exception: {:#?}" ,
155
155
get_current_taskid( ) ,
@@ -159,7 +159,7 @@ extern "x86-interrupt" fn out_of_bound_exception(stack_frame: &mut ExceptionStac
159
159
abort ( ) ;
160
160
}
161
161
162
- extern "x86-interrupt" fn invalid_opcode_exception ( stack_frame : & mut ExceptionStackFrame ) {
162
+ extern "x86-interrupt" fn invalid_opcode_exception ( stack_frame : ExceptionStackFrame ) {
163
163
info ! (
164
164
"Task {} receive a Invalid Opcode Exception: {:#?}" ,
165
165
get_current_taskid( ) ,
@@ -169,7 +169,7 @@ extern "x86-interrupt" fn invalid_opcode_exception(stack_frame: &mut ExceptionSt
169
169
abort ( ) ;
170
170
}
171
171
172
- extern "x86-interrupt" fn no_coprocessor_exception ( stack_frame : & mut ExceptionStackFrame ) {
172
+ extern "x86-interrupt" fn no_coprocessor_exception ( stack_frame : ExceptionStackFrame ) {
173
173
info ! (
174
174
"Task {} receive a Coprocessor Not Available Exception: {:#?}" ,
175
175
get_current_taskid( ) ,
@@ -182,7 +182,7 @@ extern "x86-interrupt" fn no_coprocessor_exception(stack_frame: &mut ExceptionSt
182
182
// 8: Double Fault Exception (With Error Code!)
183
183
184
184
extern "x86-interrupt" fn double_fault_exception (
185
- stack_frame : & mut ExceptionStackFrame ,
185
+ stack_frame : ExceptionStackFrame ,
186
186
error_code : u64 ,
187
187
) {
188
188
info ! (
@@ -197,7 +197,7 @@ extern "x86-interrupt" fn double_fault_exception(
197
197
198
198
// 9: Coprocessor Segment Overrun Exception
199
199
200
- extern "x86-interrupt" fn overrun_exception ( stack_frame : & mut ExceptionStackFrame ) {
200
+ extern "x86-interrupt" fn overrun_exception ( stack_frame : ExceptionStackFrame ) {
201
201
info ! (
202
202
"Task {} receive a Coprocessor Segment Overrun Exception: {:#?}" ,
203
203
get_current_taskid( ) ,
@@ -214,7 +214,7 @@ extern "x86-interrupt" fn overrun_exception(stack_frame: &mut ExceptionStackFram
214
214
// 14: Page Fault Exception (With Error Code!)
215
215
216
216
extern "x86-interrupt" fn bad_tss_exception (
217
- stack_frame : & mut ExceptionStackFrame ,
217
+ stack_frame : ExceptionStackFrame ,
218
218
error_code : u64 ,
219
219
) {
220
220
info ! (
@@ -228,7 +228,7 @@ extern "x86-interrupt" fn bad_tss_exception(
228
228
}
229
229
230
230
extern "x86-interrupt" fn not_present_exception (
231
- stack_frame : & mut ExceptionStackFrame ,
231
+ stack_frame : ExceptionStackFrame ,
232
232
error_code : u64 ,
233
233
) {
234
234
info ! (
@@ -242,7 +242,7 @@ extern "x86-interrupt" fn not_present_exception(
242
242
}
243
243
244
244
extern "x86-interrupt" fn stack_fault_exception (
245
- stack_frame : & mut ExceptionStackFrame ,
245
+ stack_frame : ExceptionStackFrame ,
246
246
error_code : u64 ,
247
247
) {
248
248
info ! (
@@ -256,7 +256,7 @@ extern "x86-interrupt" fn stack_fault_exception(
256
256
}
257
257
258
258
extern "x86-interrupt" fn general_protection_exception (
259
- stack_frame : & mut ExceptionStackFrame ,
259
+ stack_frame : ExceptionStackFrame ,
260
260
error_code : u64 ,
261
261
) {
262
262
info ! (
@@ -270,7 +270,7 @@ extern "x86-interrupt" fn general_protection_exception(
270
270
}
271
271
272
272
extern "x86-interrupt" fn page_fault_exception (
273
- stack_frame : & mut ExceptionStackFrame ,
273
+ stack_frame : ExceptionStackFrame ,
274
274
error_code : u64 ,
275
275
) {
276
276
info ! (
@@ -289,7 +289,7 @@ extern "x86-interrupt" fn page_fault_exception(
289
289
// 18: Machine Check Exception
290
290
// 19-31: Reserved
291
291
292
- extern "x86-interrupt" fn floating_point_exception ( stack_frame : & mut ExceptionStackFrame ) {
292
+ extern "x86-interrupt" fn floating_point_exception ( stack_frame : ExceptionStackFrame ) {
293
293
info ! (
294
294
"Task {} receive a Floating Point Exception: {:#?}" ,
295
295
get_current_taskid( ) ,
@@ -299,7 +299,7 @@ extern "x86-interrupt" fn floating_point_exception(stack_frame: &mut ExceptionSt
299
299
abort ( ) ;
300
300
}
301
301
302
- extern "x86-interrupt" fn alignment_check_exception ( stack_frame : & mut ExceptionStackFrame ) {
302
+ extern "x86-interrupt" fn alignment_check_exception ( stack_frame : ExceptionStackFrame ) {
303
303
info ! (
304
304
"Task {} receive a Alignment Check Exception: {:#?}" ,
305
305
get_current_taskid( ) ,
@@ -309,7 +309,7 @@ extern "x86-interrupt" fn alignment_check_exception(stack_frame: &mut ExceptionS
309
309
abort ( ) ;
310
310
}
311
311
312
- extern "x86-interrupt" fn machine_check_exception ( stack_frame : & mut ExceptionStackFrame ) {
312
+ extern "x86-interrupt" fn machine_check_exception ( stack_frame : ExceptionStackFrame ) {
313
313
info ! (
314
314
"Task {} receive a Machine Check Exception: {:#?}" ,
315
315
get_current_taskid( ) ,
@@ -319,7 +319,7 @@ extern "x86-interrupt" fn machine_check_exception(stack_frame: &mut ExceptionSta
319
319
abort ( ) ;
320
320
}
321
321
322
- extern "x86-interrupt" fn reserved_exception ( stack_frame : & mut ExceptionStackFrame ) {
322
+ extern "x86-interrupt" fn reserved_exception ( stack_frame : ExceptionStackFrame ) {
323
323
info ! (
324
324
"Task {} receive a reserved exception: {:#?}" ,
325
325
get_current_taskid( ) ,
@@ -329,7 +329,7 @@ extern "x86-interrupt" fn reserved_exception(stack_frame: &mut ExceptionStackFra
329
329
abort ( ) ;
330
330
}
331
331
332
- extern "x86-interrupt" fn unhandled_irq1 ( stack_frame : & mut ExceptionStackFrame ) {
332
+ extern "x86-interrupt" fn unhandled_irq1 ( stack_frame : ExceptionStackFrame ) {
333
333
info ! (
334
334
"Task {} receive unknown interrupt: {:#?}" ,
335
335
get_current_taskid( ) ,
@@ -339,7 +339,7 @@ extern "x86-interrupt" fn unhandled_irq1(stack_frame: &mut ExceptionStackFrame)
339
339
abort ( ) ;
340
340
}
341
341
342
- extern "x86-interrupt" fn unhandled_irq2 ( stack_frame : & mut ExceptionStackFrame ) {
342
+ extern "x86-interrupt" fn unhandled_irq2 ( stack_frame : ExceptionStackFrame ) {
343
343
info ! (
344
344
"Task {} receive unknown interrupt: {:#?}" ,
345
345
get_current_taskid( ) ,
@@ -350,7 +350,7 @@ extern "x86-interrupt" fn unhandled_irq2(stack_frame: &mut ExceptionStackFrame)
350
350
abort ( ) ;
351
351
}
352
352
353
- extern "x86-interrupt" fn timer_handler ( stack_frame : & mut ExceptionStackFrame ) {
353
+ extern "x86-interrupt" fn timer_handler ( stack_frame : ExceptionStackFrame ) {
354
354
debug ! (
355
355
"Task {} receive timer interrupt!\n {:#?}" ,
356
356
get_current_taskid( ) ,
@@ -456,7 +456,7 @@ impl InteruptHandler {
456
456
pub fn add_handler (
457
457
& mut self ,
458
458
int_no : usize ,
459
- func : extern "x86-interrupt" fn ( & mut ExceptionStackFrame ) ,
459
+ func : extern "x86-interrupt" fn ( ExceptionStackFrame ) ,
460
460
) {
461
461
if int_no < IDT_ENTRIES {
462
462
self . idt [ int_no] = IdtEntry :: new (
0 commit comments