Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
xv6-public
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
问题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
银宸时代
OS Lab Group
奖励实验
xv6-public
提交
d911d83c
提交
d911d83c
9月 08, 2006
创建
作者:
rsc
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix various comments
上级
ec5783cb
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
3 行增加
和
9 行删除
+3
-9
fs.c
fs.c
+0
-6
fs.h
fs.h
+2
-2
proc.c
proc.c
+1
-1
没有找到文件。
fs.c
浏览文件 @
d911d83c
...
...
@@ -26,9 +26,6 @@
// so we don't use spin locks. Instead, if a process wants to use
// a particular inode, it must sleep(ip) to wait for it to be not busy.
// See iget below.
//
// XXX Inodes with dev == 0 exist only in memory. They have no on-disk
// representation. This functionality is used to implement pipes.
struct
inode
inode
[
NINODE
];
struct
spinlock
inode_table_lock
;
...
...
@@ -362,7 +359,6 @@ iincref(struct inode *ip)
}
// Copy stat information from inode.
// XXX Assumes inode is from disk file system.
void
stati
(
struct
inode
*
ip
,
struct
stat
*
st
)
{
...
...
@@ -376,7 +372,6 @@ stati(struct inode *ip, struct stat *st)
#define min(a, b) ((a) < (b) ? (a) : (b))
// Read data from inode.
// XXX Assumes inode is from disk file system.
int
readi
(
struct
inode
*
ip
,
char
*
dst
,
uint
off
,
uint
n
)
{
...
...
@@ -440,7 +435,6 @@ newblock(struct inode *ip, uint lbn)
}
// Write data to inode.
// XXX Assumes inode is from disk file system.
int
writei
(
struct
inode
*
ip
,
char
*
addr
,
uint
off
,
uint
n
)
{
...
...
fs.h
浏览文件 @
d911d83c
...
...
@@ -9,8 +9,8 @@
// File system super block
struct
superblock
{
uint
size
;
// Size of file system
(bytes???) xxx
uint
nblocks
;
// Number of blocks
uint
size
;
// Size of file system
image (blocks)
uint
nblocks
;
// Number of
data
blocks
uint
ninodes
;
// Number of inodes.
};
...
...
proc.c
浏览文件 @
d911d83c
...
...
@@ -38,7 +38,7 @@ setupsegs(struct proc *p)
}
c
->
gdt
[
0
]
=
SEG_NULL
;
c
->
gdt
[
SEG_KCODE
]
=
SEG
(
STA_X
|
STA_R
,
0
,
0x100000
+
64
*
1024
,
0
);
// xxx
c
->
gdt
[
SEG_KCODE
]
=
SEG
(
STA_X
|
STA_R
,
0
,
0x100000
+
64
*
1024
,
0
);
c
->
gdt
[
SEG_KDATA
]
=
SEG
(
STA_W
,
0
,
0xffffffff
,
0
);
c
->
gdt
[
SEG_TSS
]
=
SEG16
(
STS_T32A
,
(
uint
)
&
c
->
ts
,
sizeof
(
c
->
ts
),
0
);
c
->
gdt
[
SEG_TSS
].
s
=
0
;
...
...
编写
预览
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论