Change to the interrupt handler return values.

Also reflect the change of function name and number of
parameters.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@339 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
David Reid
2002-07-19 16:04:12 +00:00
parent fd2ee3a598
commit 9adc7af78a
4 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -38,6 +38,6 @@ int i386_double_fault(int errorcode)
kprintf("double fault! errorcode = 0x%x\n", errorcode); kprintf("double fault! errorcode = 0x%x\n", errorcode);
dprintf("double fault! errorcode = 0x%x\n", errorcode); dprintf("double fault! errorcode = 0x%x\n", errorcode);
for(;;); for(;;);
return INT_NO_RESCHEDULE; return B_HANDLED_INTERRUPT;
} }
+3 -3
View File
@@ -156,7 +156,7 @@ bool arch_int_is_interrupts_enabled(void)
void i386_handle_trap(struct int_frame frame); /* keep the compiler happy, this function must be called only from assembly */ void i386_handle_trap(struct int_frame frame); /* keep the compiler happy, this function must be called only from assembly */
void i386_handle_trap(struct int_frame frame) void i386_handle_trap(struct int_frame frame)
{ {
int ret = INT_NO_RESCHEDULE; int ret = B_HANDLED_INTERRUPT;
// if(frame.vector != 0x20) // if(frame.vector != 0x20)
// dprintf("i386_handle_trap: vector 0x%x, ip 0x%x, cpu %d\n", frame.vector, frame.eip, smp_get_current_cpu()); // dprintf("i386_handle_trap: vector 0x%x, ip 0x%x, cpu %d\n", frame.vector, frame.eip, smp_get_current_cpu());
@@ -235,12 +235,12 @@ void i386_handle_trap(struct int_frame frame)
ret = int_io_interrupt_handler(frame.vector); ret = int_io_interrupt_handler(frame.vector);
} else { } else {
panic("i386_handle_trap: unhandled cpu trap 0x%x at ip 0x%x!\n", frame.vector, frame.eip); panic("i386_handle_trap: unhandled cpu trap 0x%x at ip 0x%x!\n", frame.vector, frame.eip);
ret = INT_NO_RESCHEDULE; ret = B_HANDLED_INTERRUPT;
} }
break; break;
} }
if(ret == INT_RESCHEDULE) { if (ret == B_INVOKE_SCHEDULER) {
int state = int_disable_interrupts(); int state = int_disable_interrupts();
GRAB_THREAD_LOCK(); GRAB_THREAD_LOCK();
thread_resched(); thread_resched();
+6 -6
View File
@@ -51,7 +51,7 @@ static int i386_spurious_interrupt(void* data)
// spurious interrupt // spurious interrupt
// dprintf("spurious interrupt on cpu %d\n", arch_smp_get_current_cpu()); // dprintf("spurious interrupt on cpu %d\n", arch_smp_get_current_cpu());
arch_smp_ack_interrupt(); arch_smp_ack_interrupt();
return INT_NO_RESCHEDULE; return B_HANDLED_INTERRUPT;
} }
static int i386_smp_error_interrupt(void* data) static int i386_smp_error_interrupt(void* data)
@@ -59,7 +59,7 @@ static int i386_smp_error_interrupt(void* data)
// smp error interrupt // smp error interrupt
// dprintf("smp error interrupt on cpu %d\n", arch_smp_get_current_cpu()); // dprintf("smp error interrupt on cpu %d\n", arch_smp_get_current_cpu());
arch_smp_ack_interrupt(); arch_smp_ack_interrupt();
return INT_NO_RESCHEDULE; return B_HANDLED_INTERRUPT;
} }
static unsigned int apic_read(unsigned int *addr) static unsigned int apic_read(unsigned int *addr)
@@ -92,10 +92,10 @@ int arch_smp_init(kernel_args *ka)
vm_create_anonymous_region(vm_get_kernel_aspace_id(), "ioapic", (void *)&ioapic, vm_create_anonymous_region(vm_get_kernel_aspace_id(), "ioapic", (void *)&ioapic,
REGION_ADDR_EXACT_ADDRESS, PAGE_SIZE, REGION_WIRING_WIRED_ALREADY, LOCK_RW|LOCK_KERNEL); REGION_ADDR_EXACT_ADDRESS, PAGE_SIZE, REGION_WIRING_WIRED_ALREADY, LOCK_RW|LOCK_KERNEL);
int_set_io_interrupt_handler(0xfb, &i386_timer_interrupt, NULL); install_io_interrupt_handler(0xfb, &i386_timer_interrupt, NULL, 0);
int_set_io_interrupt_handler(0xfd, &i386_ici_interrupt, NULL); install_io_interrupt_handler(0xfd, &i386_ici_interrupt, NULL, 0);
int_set_io_interrupt_handler(0xfe, &i386_smp_error_interrupt, NULL); install_io_interrupt_handler(0xfe, &i386_smp_error_interrupt, NULL, 0);
int_set_io_interrupt_handler(0xff, &i386_spurious_interrupt, NULL); install_io_interrupt_handler(0xff, &i386_spurious_interrupt, NULL, 0);
} else { } else {
num_cpus = 1; num_cpus = 1;
} }
+1 -1
View File
@@ -72,7 +72,7 @@ int arch_init_timer(kernel_args *ka)
{ {
dprintf("arch_init_timer: entry\n"); dprintf("arch_init_timer: entry\n");
int_set_io_interrupt_handler(0x20, &isa_timer_interrupt, NULL); install_io_interrupt_handler(0x20, &isa_timer_interrupt, NULL, 0);
// apic timer interrupt set up by smp code // apic timer interrupt set up by smp code
return 0; return 0;