From: Ben Pfaff Date: Thu, 26 Aug 2004 21:44:12 +0000 (+0000) Subject: intr_args => intr_frame. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pintos-anon;a=commitdiff_plain;h=f8cae751ac2163f5fe73d5b1372c93ada35dc9e3 intr_args => intr_frame. --- diff --git a/src/devices/kbd.c b/src/devices/kbd.c index 21c98a5..e5d3d82 100644 --- a/src/devices/kbd.c +++ b/src/devices/kbd.c @@ -5,7 +5,7 @@ #include "lib.h" static void -irq21_keyboard (struct intr_args *args UNUSED) +irq21_keyboard (struct intr_frame *args UNUSED) { printk ("Keyboard!\n"); inb (0x60); diff --git a/src/devices/timer.c b/src/devices/timer.c index 67fe567..4adca89 100644 --- a/src/devices/timer.c +++ b/src/devices/timer.c @@ -6,7 +6,7 @@ static volatile uint64_t ticks; static void -irq20_timer (struct intr_args *args UNUSED) +irq20_timer (struct intr_frame *args UNUSED) { ticks++; intr_yield_on_return (); diff --git a/src/threads/interrupt.c b/src/threads/interrupt.c index 3ae5050..4ab0050 100644 --- a/src/threads/interrupt.c +++ b/src/threads/interrupt.c @@ -98,13 +98,13 @@ extern void (*intr_stubs[256]) (void); intr_handler_func *intr_handlers[256]; -void intr_handler (struct intr_args *args); +void intr_handler (struct intr_frame *args); bool intr_in_progress; bool yield_on_return; void -intr_handler (struct intr_args *args) +intr_handler (struct intr_frame *args) { bool external; @@ -256,10 +256,10 @@ intr_init (void) } void -intr_unexpected (struct intr_args *regs) +intr_unexpected (struct intr_frame *regs) { uint32_t cr2; asm ("movl %%cr2, %0" : "=r" (cr2)); - panic ("Unexpected interrupt 0x%02x, error code %08x, cr2=%08x, eip=%08x", - regs->vec_no, regs->error_code, cr2, regs->eip); + panic ("Unexpected interrupt 0x%02x, error code %08x, cr2=%08x, eip=%p", + regs->vec_no, regs->error_code, cr2, (void *) regs->eip); } diff --git a/src/threads/interrupt.h b/src/threads/interrupt.h index 2a2b3ef..917fc75 100644 --- a/src/threads/interrupt.h +++ b/src/threads/interrupt.h @@ -15,7 +15,7 @@ enum if_level intr_set_level (enum if_level); enum if_level intr_enable (void); enum if_level intr_disable (void); -struct intr_args +struct intr_frame { /* Pushed by the stubs. */ uint32_t edi; @@ -41,7 +41,7 @@ struct intr_args uint16_t ss, :16; }; -typedef void intr_handler_func (struct intr_args *); +typedef void intr_handler_func (struct intr_frame *); void intr_init (void); void intr_register (uint8_t vec, int dpl, enum if_level, intr_handler_func *);