old-www/HOWTO/IO-Port-Programming-3.html

33 lines
1.3 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
<TITLE>Linux I/O port programming mini-HOWTO: Interrupts (IRQs) and DMA access</TITLE>
<LINK HREF="IO-Port-Programming-4.html" REL=next>
<LINK HREF="IO-Port-Programming-2.html" REL=previous>
<LINK HREF="IO-Port-Programming.html#toc3" REL=contents>
</HEAD>
<BODY>
<A HREF="IO-Port-Programming-4.html">Next</A>
<A HREF="IO-Port-Programming-2.html">Previous</A>
<A HREF="IO-Port-Programming.html#toc3">Contents</A>
<HR>
<H2><A NAME="s3">3. Interrupts (IRQs) and DMA access</A></H2>
<P>You cannot use IRQs or DMA directly from a user-mode process. You need
to write a kernel driver; see
<A HREF="http://www.redhat.com:8080/HyperNews/get/khg.html">The Linux Kernel Hacker's Guide</A> for details and the kernel source code
for examples.
<P>You can disable interrupts from within a user-mode program, though it can
be dangerous (even kernel drivers do it for as short a time as possible).
After calling <CODE>iopl(3)</CODE>, you can disable interrupts simply by calling
<CODE>asm("cli");</CODE>, and re-enable them with <CODE>asm("sti");</CODE>.
<P>
<P>
<HR>
<A HREF="IO-Port-Programming-4.html">Next</A>
<A HREF="IO-Port-Programming-2.html">Previous</A>
<A HREF="IO-Port-Programming.html#toc3">Contents</A>
</BODY>
</HTML>