Skip to contentSkip to conversation

DOS functions setvect, getvect

DISCUSSION Alvaro de Luna 3 participants 3 messages May 14, 2002

lore
Share & tools
lore
#0 lore raw

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.

#1 lore raw

Hi, Device driver structure in Linux is totally different from what you have in DOS. there is a book named "Linux device drivers", ISBN: ISBN: 0-596-00008-1 check that out.
good luck
Masoud

Quoted 15 lines · Alvaro de Luna

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.

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

Signature · 3 lines
Masoud Sharabiani
Software Developer, OEone Corporation
#103 - 290 St-Joseph Blvd.  Hull, Quebec J8Y 3Y3
#2 lore raw
In reply to Alvaro de Luna
Quoted 9 lines · Alvaro de Luna

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.