Re: IRQs in 1.3.x

Ulrich Windl (Ulrich.Windl@rz.uni-regensburg.de)
Mon, 11 Mar 1996 09:53:47 +0100


On 10 Mar 96 at 4:18, Elliot Frisch wrote:

> Could someone tell me why the "/usr/src/linux/arch/i386/irq.c" has all of
> those if-else(s) instead of a switch... (as in the patch)?

I guess it's software evolution: Once there might be a test using
"<", ">", or maybe "&&". Then some lines were removed, or added, or
both, and then you could optimize the code. I wonder if a compiler
can be smart enough to do that.

BTW. Most people use x >> 10 to say x /1024. Even Turbo-C 2.0 can do
that if x is unsigned. Same is true for x & 0x7 and x % 8. Maybe
these are all relicts from gcc-1.x...

>
> Thanks,
> elliott
>
------------
Ulrich Windl Klinikum der Universitaet Regensburg
Rechenzentrum DV-med Franz-Josef-Strauss-Allee 11
Tel: +49 941 944-5879 D-93053 Regensburg
FAX: +49 941 944-5882
Just imagine my mail address were <Ulrich.Windl@rz.uni.r.de>...