refactor: cut off some bloats in intr_ctx
[lunaix-os.git] / lunaix-os / kernel / asm / x86 / interrupts.c
index 25b3791e7415f73af0d632d3702e020ced94a9a3..b4a443f10376812bd94cb3abb4051fe090b1ee08 100644 (file)
@@ -21,24 +21,24 @@ intr_handler(isr_param* param)
 {
     __current->intr_ctx = *param;
 
-    isr_param* lparam = &__current->intr_ctx;
+    struct exec_param* execp = __current->intr_ctx.execp;
 
-    if (lparam->vector <= 255) {
-        isr_cb subscriber = isrm_get(lparam->vector);
+    if (execp->vector <= 255) {
+        isr_cb subscriber = isrm_get(execp->vector);
         subscriber(param);
         goto done;
     }
 
     kprint_panic("INT %u: (%x) [%p: %p] Unknown",
-                 lparam->vector,
-                 lparam->err_code,
-                 lparam->cs,
-                 lparam->eip);
+                 execp->vector,
+                 execp->err_code,
+                 execp->cs,
+                 execp->eip);
 
 done:
     // for all external interrupts except the spurious interrupt
     //  this is required by Intel Manual Vol.3A, section 10.8.1 & 10.8.5
-    if (lparam->vector >= IV_EX && lparam->vector != APIC_SPIV_IV) {
+    if (execp->vector >= IV_EX && execp->vector != APIC_SPIV_IV) {
         apic_done_servicing();
     }