⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 node15.html

📁 Linux可卸载模块编程
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 98.1 release (February 19th, 1998)
originally by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Multiple Kernel Versions Source Files</TITLE>
<META NAME="description" CONTENT="Multiple Kernel Versions Source Files">
<META NAME="keywords" CONTENT="mpg">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<LINK REL="STYLESHEET" HREF="mpg.css">
<LINK REL="previous" HREF="node14.html">
<LINK REL="up" HREF="node14.html">
<LINK REL="next" HREF="node16.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<A NAME="tex2html563"
 HREF="node16.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
 SRC="next_motif.gif"></A> 
<A NAME="tex2html559"
 HREF="node14.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
 SRC="up_motif.gif"></A> 
<A NAME="tex2html555"
 HREF="node14.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
 SRC="previous_motif.gif"></A> 
<A NAME="tex2html561"
 HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
 SRC="contents_motif.gif"></A> 
<A NAME="tex2html562"
 HREF="node34.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
 SRC="index_motif.gif"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html564"
 HREF="node16.html">The /proc File System</A>
<B> Up:</B> <A NAME="tex2html560"
 HREF="node14.html">Character Device Files</A>
<B> Previous:</B> <A NAME="tex2html556"
 HREF="node14.html">Character Device Files</A>
<BR>
<BR>
<!--End of Navigation Panel-->

<H1><A NAME="SECTION00410000000000000000">&#160;</A><A NAME="kernel-ver">&#160;</A><A NAME="293">&#160;</A>
<BR>
Multiple Kernel Versions Source Files
</H1>

<P>
The system calls, which are the major interface the kernel shows to the
processes, generally stay the same across versions. A new system call
may be added, but usually the old ones will behave exactly like they
used to. This is necessary for backward compatibility -- a new kernel
version is <B>not</B> supposed to break regular processes. In most cases,
the device files will also remain the same. On the other hand, the internal
interfaces within the kernel can and do change between versions.

<P>
The Linux kernel versions are divided between the stable versions (n.&lt;even
number&gt;.m) and the development versions (n.&lt;odd number&gt;.m). The 
development versions include all the cool new ideas, including those which
will be considered a mistake, or reimplemented, in the next version. As a
result, you can't trust the interface to remain the same in those versions
(which is why I don't bother to support them in this book, it's too much
work and it would become dated too quickly). In the stable versions, on the
other hand, we can expect the interface to remain the same regardless of the
bug fix version (the m number).
<A NAME="295">&#160;</A><A NAME="296">&#160;</A>

<P>
This version of the MPG includes support for both version 2.0.x and version 
2.2.x of the Linux kernel. Since there are differences between the two, this
requires conditional compilation depending on the kernel version. The way
to do this to use the macro <TT>LINUX_VERSION_CODE</TT>. In version a.b.c of
the kernel, the value of this macro would be 
<!-- MATH: $2^{16}a+2^{8}b+c$ -->
2<SUP>16</SUP><I>a</I>+2<SUP>8</SUP><I>b</I>+<I>c</I>. To get the
value for a specific kernel version, we can use the 
<TT>KERNEL_VERSION</TT> macro. Since it's not defined in 2.0.35, we define it
ourselves if necessary.
<A NAME="301">&#160;</A><A NAME="302">&#160;</A><A NAME="303">&#160;</A>
<A NAME="304">&#160;</A><A NAME="305">&#160;</A>
<A NAME="306">&#160;</A> <A NAME="307">&#160;</A>

<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html563"
 HREF="node16.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
 SRC="next_motif.gif"></A> 
<A NAME="tex2html559"
 HREF="node14.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
 SRC="up_motif.gif"></A> 
<A NAME="tex2html555"
 HREF="node14.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
 SRC="previous_motif.gif"></A> 
<A NAME="tex2html561"
 HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
 SRC="contents_motif.gif"></A> 
<A NAME="tex2html562"
 HREF="node34.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
 SRC="index_motif.gif"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html564"
 HREF="node16.html">The /proc File System</A>
<B> Up:</B> <A NAME="tex2html560"
 HREF="node14.html">Character Device Files</A>
<B> Previous:</B> <A NAME="tex2html556"
 HREF="node14.html">Character Device Files</A>
<!--End of Navigation Panel-->
<ADDRESS>
<I></I>
<BR><I>1999-05-19</I>
</ADDRESS>
</BODY>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -