19.html

来自「linux 0.11中文版 有注释」· HTML 代码 · 共 51 行

HTML
51
字号
<html>
<head>
<title>fs/super.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/98.html'>fs</a>/super.c</h2>
<i><font color='green'>/* [&lt;][&gt;]<a href='#L45'>[^]</a><a href='#L354'>[v]</a>[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='#L45' title='Defined at 45.'>lock_super</a>
<li><a href='#L56' title='Defined at 56.'>free_super</a>
<li><a href='#L66' title='Defined at 66.'>wait_on_super</a>
<li><a href='#L76' title='Defined at 76.'>get_super</a>
<li><a href='#L108' title='Defined at 108.'>put_super</a>
<li><a href='#L146' title='Defined at 146.'>read_super</a>
<li><a href='#L241' title='Defined at 241.'>sys_umount</a>
<li><a href='#L290' title='Defined at 290.'>sys_mount</a>
<li><a href='#L354' title='Defined at 354.'>mount_root</a>
</ol>
<hr>
<pre>
<a name='L1'><i><font color='green'>/*</font></i>
<a name='L2'><i><font color='green'>* linux/fs/super.c</font></i>
<a name='L3'><i><font color='green'>*</font></i>
<a name='L4'><i><font color='green'>* (C) 1991 Linus Torvalds</font></i>
<a name='L5'><i><font color='green'>*/</font></i>
<a name='L6'>
<a name='L7'><i><font color='green'>/*</font></i>
<a name='L8'><i><font color='green'>* super.c contains code to handle the super-block tables.</font></i>
<a name='L9'><i><font color='green'>*/</font></i>
<a name='L10'><font color='darkred'>#include</font> &lt;<a href='30.html'>linux/config.h</a>&gt;       <i><font color='green'>// 内核配置头文件。定义键盘语言和硬盘类型(HD_TYPE)可选项。</font></i>
<a name='L11'><font color='darkred'>#include</font> &lt;<a href='36.html'>linux/sched.h</a>&gt;        <i><font color='green'>// 调度程序头文件,定义了任务结构task_struct、初始任务0 的数据,</font></i>
<a name='L12'><i><font color='green'>// 还有一些有关描述符参数设置和获取的嵌入式汇编函数宏语句。</font></i>
<a name='L13'><font color='darkred'>#include</font> &lt;<a href='34.html'>linux/kernel.h</a>&gt;       <i><font color='green'>// 内核头文件。含有一些内核常用函数的原形定义。</font></i>
<a name='L14'><font color='darkred'>#include</font> &lt;<a href='25.html'>asm/system.h</a>&gt;         <i><font color='green'>// 系统头文件。定义了设置或修改描述符/中断门等的嵌入式汇编宏。</font></i>
<a name='L15'>
<a name='L16'><font color='darkred'>#include</font> &lt;<a href='28.html'>errno.h</a>&gt;              <i><font color='green'>// 错误号头文件。包含系统中各种出错号。(Linus 从minix 中引进的)。</font></i>
<a name='L17'><font color='darkred'>#include</font> &lt;<a href='43.html'>sys/stat.h</a>&gt;           <i><font color='green'>// 文件状态头文件。含有文件或文件系统状态结构stat{}和常量。</font></i>
<a name='L18'>
<a name='L19'><b>int</b> <a href='../S/6.html#L93' title='Defined at 93 in fs/buffer.c.'>sync_dev</a> (<b>int</b> dev);         <i><font color='green'>// 对指定设备执行高速缓冲与设备上数据的同步操作。(fs/buffer.c,59)</font></i>
<a name='L20'><b>void</b> <a href='../S/65.html#L183' title='Defined at 183 in kernel/chr_drv/tty_io.c.'>wait_for_keypress</a> (<b>void</b>);  <i><font color='green'>// 等待击键。(kernel/chr_drv/tty_io.c, 140)</font></i>
<a name='L21'>
<a name='L22'><i><font color='green'>/* set_bit uses setb, as gas doesn't recognize setc */</font></i>
<a name='L23'><i><font color='green'>/* set_bit()使用了setb 指令,因为汇编编译器gas 不能识别指令setc */</font></i>
<a name='L24'><i><font color='green'>//// 测试指定位偏移处比特位的值(0 或1),并返回该比特位值。(应该取名为test_bit()更妥帖)</font></i>
<a name='L25'><a href='../S/19.html#L354' title='Defined at 354 in fs/super.c.'>mount_root</a>
<a name='L26'>  

⌨️ 快捷键说明

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