Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm26/arm26 Keep track of interrupt depth. With fo...



details:   https://anonhg.NetBSD.org/src/rev/771e43a79bdd
branches:  trunk
changeset: 508890:771e43a79bdd
user:      bjh21 <bjh21%NetBSD.org@localhost>
date:      Sat Apr 21 18:51:17 2001 +0000

description:
Keep track of interrupt depth.  With forthcoming changes to cpu.h, this gets
us accounting for interrupt time.

diffstat:

 sys/arch/arm26/arm26/irq.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (43 lines):

diff -r ae5dd688651f -r 771e43a79bdd sys/arch/arm26/arm26/irq.c
--- a/sys/arch/arm26/arm26/irq.c        Sat Apr 21 17:58:21 2001 +0000
+++ b/sys/arch/arm26/arm26/irq.c        Sat Apr 21 18:51:17 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: irq.c,v 1.16 2001/04/15 11:59:43 bjh21 Exp $ */
+/* $NetBSD: irq.c,v 1.17 2001/04/21 18:51:17 bjh21 Exp $ */
 
 /*-
  * Copyright (c) 2000, 2001 Ben Harris
@@ -33,7 +33,7 @@
 
 #include <sys/param.h>
 
-__RCSID("$NetBSD: irq.c,v 1.16 2001/04/15 11:59:43 bjh21 Exp $");
+__RCSID("$NetBSD: irq.c,v 1.17 2001/04/21 18:51:17 bjh21 Exp $");
 
 #include <sys/device.h>
 #include <sys/kernel.h> /* for cold */
@@ -70,6 +70,8 @@
 #define NIRQ 20
 extern char *irqnames[];
 
+int current_intr_depth = 0;
+
 /*
  * Interrupt masks are held in 32-bit integers.  At present, the
  * bottom eight bits are interrupt register A on the IOC, and the next
@@ -117,6 +119,7 @@
        int s, status, result, stray;
        struct irq_handler *h;
 
+       current_intr_depth++;
        KASSERT(the_ioc != NULL);
        /* Get the current interrupt state */
        status = ioc_irq_status_full();
@@ -173,6 +176,7 @@
 
        int_off();
        hardsplx(s);
+       current_intr_depth--;
 }
 
 struct irq_handler *



Home | Main Index | Thread Index | Old Index