* Re: DOS functions setvect, getvect
2002-05-14 13:46 DOS functions setvect, getvect Alvaro de Luna
@ 2002-05-14 13:59 ` Masoud Sharbiani
2002-05-14 15:10 ` Richard B. Johnson
1 sibling, 0 replies; 3+ messages in thread
From: Masoud Sharbiani @ 2002-05-14 13:59 UTC (permalink / raw)
To: Alvaro de Luna; +Cc: linux-kernel
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
On Tue, May 14, 2002 at 03:46:48PM +0200, 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.
>
>
> -
> 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/
--
Masoud Sharabiani
Software Developer, OEone Corporation
#103 - 290 St-Joseph Blvd. Hull, Quebec J8Y 3Y3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: DOS functions setvect, getvect
2002-05-14 13:46 DOS functions setvect, getvect Alvaro de Luna
2002-05-14 13:59 ` Masoud Sharbiani
@ 2002-05-14 15:10 ` Richard B. Johnson
1 sibling, 0 replies; 3+ messages in thread
From: Richard B. Johnson @ 2002-05-14 15:10 UTC (permalink / raw)
To: Alvaro de Luna; +Cc: linux-kernel
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.
^ permalink raw reply [flat|nested] 3+ messages in thread