From 753a97024e7868b0699096ceb163d8a54e425d05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 4 Mar 2008 21:49:40 +0000 Subject: [PATCH] * This fixes the broken count of unhandled interrupts which caused some problems in the past (it only worked for level triggered interrupts). * Of course, the actual problem is that on current hardware we detect almost all interrupts as edge triggered... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24239 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/int.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/system/kernel/int.c b/src/system/kernel/int.c index 8edba2970c..73c9f80da4 100644 --- a/src/system/kernel/int.c +++ b/src/system/kernel/int.c @@ -1,5 +1,5 @@ /* - * Copyright 2002-2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved. + * Copyright 2002-2008, Axel Dörfler, axeld@pinc-software.de. All rights reserved. * Distributed under the terms of the MIT License. * * Copyright 2001-2002, Travis Geiselbrecht. All rights reserved. @@ -126,12 +126,12 @@ int_init_post_vm(kernel_args *args) io_vectors[i].vector_lock = 0; /* initialize spinlock */ io_vectors[i].enable_count = 0; io_vectors[i].no_lock_vector = false; - #ifdef DEBUG_INT - io_vectors[i].handled_count = 0; - io_vectors[i].unhandled_count = 0; - io_vectors[i].trigger_count = 0; - io_vectors[i].ignored_count = 0; - #endif +#ifdef DEBUG_INT + io_vectors[i].handled_count = 0; + io_vectors[i].unhandled_count = 0; + io_vectors[i].trigger_count = 0; + io_vectors[i].ignored_count = 0; +#endif initque(&io_vectors[i].handler_list); /* initialize handler queue */ } @@ -302,7 +302,7 @@ int_io_interrupt_handler(int vector, bool levelTriggered) #ifdef DEBUG_INT io_vectors[vector].trigger_count++; - if (status != B_UNHANDLED_INTERRUPT) { + if (status != B_UNHANDLED_INTERRUPT || handled || invokeScheduler) { io_vectors[vector].handled_count++; } else { io_vectors[vector].unhandled_count++;