Re: signed int for interrupts??

Russell Steffen (rsteffen@ia.net)
Sun, 8 Sep 1996 14:45:29 -0500 (CDT)


> On Sun, 8 Sep 1996, Jon Lewis wrote:
>
> > 5: 1649726484 + cyclades
> > 9: 12023652 53c8xx
> > 10: 231379880 3c509
> > 11: -2104643917 + cyclades
>
> Now I'm really confused. I did some looking, and found that the interrupt
> counters _are_ or at least appear to be unsigned int.
>
> In kernel_stat.h:
> struct kernel_stat {
> ...
> unsigned int interrupts[NR_IRQS];
> ...
> };
>
> So why did my Irq 11 counter wrap at 2^31 rather than 2^32?

Off the cuff suggestion: perhaps it's the procfs code that (mis)interprets
the unsigned interrupt counter as a signed value.

I haven't looked at the kernel code for a while, so this is just a guess.

Russ

-- 
+-------------------------------------------------------+
| Russ Steffen                                          |
| EMail: rsteffen@ia.net                                |
+-------------------------------------------------------+