Re: DOS functions setvect, getvect

Richard B. Johnson (root@chaos.analogic.com)
Tue, 14 May 2002 11:10:25 -0400 (EDT)


On Tue, 14 May 2002, Alvaro de Luna wrote:

> Hi,
> I'm trying to transform a DOS driver into a Linux one, but don't
> know
> what functions use to replace "setvect" and "getvect", does anybody
> knows?
>
> Thanks,
> Alvaro.
>

You probably want ...

request_irq(IRQ_NR, isr_procedure, SA_INTERRUPT,
char_ptr_device_name, void_ptr_to_params).
... and ...

free_irq(IRQ_NR, void_ptr_to_params);

In Linux, the kernel sets up and tears down 'vectors' for you.
You need to get a book on drivers (modules).

In user-mode, there is no such thing as an interrupt vector because
they will all cause a trap to the kernel, the kernel handles them,
usually by killing the process. In one case only, the kernel
allows user mode int 0x80. This is for kernel services. You
can't "get that vector" and "set a new one".

Cheers,
Dick Johnson

Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).

Windows-2000/Professional isn't.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/