92.html
来自「linux 0.11中文版 有注释」· HTML 代码 · 共 47 行
HTML
47 行
<html>
<head>
<title>lib/_exit.c</title>
<meta name='robots' content='noindex,nofollow'>
<meta name='generator' content='GLOBAL-5.4.1'>
</head>
<body text='#191970' bgcolor='#f5f5dc' vlink='gray'>
<a name='TOP'><h2><a href='../mains.html'>root</a>/<a href='../files/108.html'>lib</a>/_exit.c</h2>
<i><font color='green'>/* [<][>]<a href='#L16'>[^]</a>[v][top]<a href='#BOTTOM'>[bottom]</a><a href='../mains.html'>[index]</a><a href='../help.html'>[help]</a> */</font></i>
<hr>
<h2>DEFINITIONS</h2>
This source file includes following definitions.
<ol>
<li><a href='#L16' title='Defined at 16.'>_exit</a>
</ol>
<hr>
<pre>
<a name='L1'>1 <i><font color='green'>/*</font></i>
<a name='L2'><i><font color='green'> 2 * linux/lib/_exit.c</font></i>
<a name='L3'><i><font color='green'> 3 *</font></i>
<a name='L4'><i><font color='green'> 4 * (C) 1991 Linus Torvalds</font></i>
<a name='L5'><i><font color='green'> 5 */</font></i>
<a name='L6'> 6 478 7
<a name='L7'><font color='darkred'>#define</font> <a href='../S/50.html#L71' title='Refered from 71 in include/unistd.h.'>__LIBRARY__</a> <i><font color='green'>// 定义一个符号常量,见下行说明。</font></i>
<a name='L8'> 8
<a name='L9'><font color='darkred'>#include</font> <<a href='50.html'>unistd.h</a>> <i><font color='green'>// Linux 标准头文件。定义了各种符号常数和类型,并申明了各种函数。</font></i>
<a name='L10'><i><font color='green'>// 如定义了__LIBRARY__,则还包括系统调用号和内嵌汇编_syscall0()等。</font></i>
<a name='L11'> 9
<a name='L12'><i><font color='green'>//// 内核使用的程序(退出)终止函数。</font></i>
<a name='L13'><i><font color='green'>// 直接调用系统中断int 0x80,功能号__NR_exit。</font></i>
<a name='L14'><i><font color='green'>// 参数:exit_code - 退出码。</font></i>
<a name='L15'> 10 <b>volatile</b> <b>void</b>
<a name='L16'><a href='../R/370.html' title='Multiple refered from 5 places.'>_exit</a> (<b>int</b> exit_code)
<a name='L17'> 11
<a name='L18'><font color='red'>{</font>
<a name='L19'><i><font color='green'>// %0 - eax(系统调用号__NR_exit);%1 - ebx(退出码exit_code)。</font></i>
<a name='L20'> 12 <b>__asm__</b> ("int $0x80"::"a" (<a href='../S/50.html#L76' title='Defined at 76 in include/unistd.h.'>__NR_exit</a>), "b" (exit_code));
<a name='L21'>13<font color='red'>}</font>
<a name='L22'>
<a name='L23'>14
</pre>
<hr>
<a name='BOTTOM'>
<i><font color='green'>/* [<][>][^]<a href='#L16'>[v]</a><a href='#TOP'>[top]</a>[bottom]<a href='../mains.html'>[index]</a><a href='../help.html'>[help]</a> */</font></i>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?