Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
xv6-public
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
问题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
银宸时代
OS Lab Group
奖励实验
xv6-public
提交
03b6376f
提交
03b6376f
9月 06, 2006
创建
作者:
rsc
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
standardize on unnamed args in prototypes
上级
cea3c346
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
46 行增加
和
46 行删除
+46
-46
defs.h
defs.h
+46
-46
没有找到文件。
defs.h
浏览文件 @
03b6376f
// kalloc.c
char
*
kalloc
(
int
n
);
void
kfree
(
char
*
cp
,
int
len
);
char
*
kalloc
(
int
);
void
kfree
(
char
*
,
int
);
void
kinit
(
void
);
// console.c
void
console_init
(
void
);
void
cprintf
(
char
*
fmt
,
...);
void
panic
(
char
*
s
);
void
cprintf
(
char
*
,
...);
void
panic
(
char
*
);
void
kbd_intr
(
void
);
// proc.c
void
pinit
(
void
);
struct
proc
;
struct
jmpbuf
;
void
setupsegs
(
struct
proc
*
);
struct
proc
*
copyproc
(
struct
proc
*
);
void
setupsegs
(
struct
proc
*
);
struct
proc
*
copyproc
(
struct
proc
*
);
struct
spinlock
;
uint
growproc
(
int
);
void
sleep
(
void
*
,
struct
spinlock
*
);
void
sleep
(
void
*
,
struct
spinlock
*
);
void
wakeup
(
void
*
);
void
scheduler
(
void
);
void
proc_exit
(
void
);
...
...
@@ -35,10 +35,10 @@ void tvinit(void);
void
idtinit
(
void
);
// string.c
void
*
memset
(
void
*
dst
,
int
c
,
uint
n
);
int
memcmp
(
const
void
*
v1
,
const
void
*
v2
,
uint
n
);
void
*
memmove
(
void
*
dst
,
const
void
*
src
,
uint
n
);
int
strncmp
(
const
char
*
p
,
const
char
*
q
,
uint
n
);
void
*
memset
(
void
*
,
int
,
uint
);
int
memcmp
(
const
void
*
,
const
void
*
,
uint
);
void
*
memmove
(
void
*
,
const
void
*
,
uint
);
int
strncmp
(
const
char
*
,
const
char
*
,
uint
);
// syscall.c
void
syscall
(
void
);
...
...
@@ -65,67 +65,67 @@ int cpu(void);
// ioapic
extern
uchar
ioapic_id
;
void
ioapic_init
(
void
);
void
ioapic_enable
(
int
irq
,
int
cpu
);
void
ioapic_enable
(
int
irq
,
int
cpu
);
// spinlock.c
struct
spinlock
;
void
initlock
(
struct
spinlock
*
,
char
*
);
void
initlock
(
struct
spinlock
*
,
char
*
);
void
acquire
(
struct
spinlock
*
);
void
release
(
struct
spinlock
*
);
int
holding
(
struct
spinlock
*
);
// main.c
void
load_icode
(
struct
proc
*
p
,
uchar
*
binary
,
uint
size
);
void
load_icode
(
struct
proc
*
,
uchar
*
,
uint
);
// pipe.c
struct
pipe
;
struct
fd
;
int
pipe_alloc
(
struct
fd
**
fd1
,
struct
fd
**
fd2
);
void
pipe_close
(
struct
pipe
*
p
,
int
writeable
);
int
pipe_write
(
struct
pipe
*
p
,
char
*
addr
,
int
n
);
int
pipe_read
(
struct
pipe
*
p
,
char
*
addr
,
int
n
);
int
pipe_alloc
(
struct
fd
**
,
struct
fd
**
);
void
pipe_close
(
struct
pipe
*
,
int
);
int
pipe_write
(
struct
pipe
*
,
char
*
,
int
);
int
pipe_read
(
struct
pipe
*
,
char
*
,
int
);
// fd.c
struct
stat
;
void
fd_init
(
void
);
int
fd_ualloc
(
void
);
struct
fd
*
fd_alloc
(
void
);
void
fd_close
(
struct
fd
*
);
int
fd_read
(
struct
fd
*
fd
,
char
*
addr
,
int
n
);
int
fd_write
(
struct
fd
*
fd
,
char
*
addr
,
int
n
);
int
fd_stat
(
struct
fd
*
fd
,
struct
stat
*
);
void
fd_incref
(
struct
fd
*
fd
);
struct
fd
*
fd_alloc
(
void
);
void
fd_close
(
struct
fd
*
);
int
fd_read
(
struct
fd
*
,
char
*
,
int
n
);
int
fd_write
(
struct
fd
*
,
char
*
,
int
n
);
int
fd_stat
(
struct
fd
*
,
struct
stat
*
);
void
fd_incref
(
struct
fd
*
);
// ide.c
void
ide_init
(
void
);
void
ide_intr
(
void
);
void
*
ide_start_rw
(
int
diskno
,
uint
secno
,
void
*
dst
,
uint
nsecs
,
int
read
);
int
ide_finish
(
void
*
);
void
*
ide_start_rw
(
int
,
uint
,
void
*
,
uint
,
int
);
int
ide_finish
(
void
*
);
// bio.c
void
binit
(
void
);
struct
buf
;
struct
buf
*
getblk
(
uint
dev
,
uint
sector
);
struct
buf
*
bread
(
uint
,
uint
);
void
bwrite
(
struct
buf
*
,
uint
);
void
brelse
(
struct
buf
*
);
struct
buf
*
getblk
(
uint
dev
,
uint
sector
);
struct
buf
*
bread
(
uint
,
uint
);
void
bwrite
(
struct
buf
*
,
uint
);
void
brelse
(
struct
buf
*
);
// fs.c
extern
uint
rootdev
;
void
iinit
(
void
);
struct
inode
*
iget
(
uint
dev
,
uint
inum
);
void
ilock
(
struct
inode
*
ip
);
void
iunlock
(
struct
inode
*
ip
);
void
itrunc
(
struct
inode
*
ip
);
void
idecref
(
struct
inode
*
ip
);
void
iincref
(
struct
inode
*
ip
);
void
iput
(
struct
inode
*
ip
);
struct
inode
*
namei
(
char
*
path
,
int
,
uint
*
,
char
**
,
struct
inode
**
);
void
stati
(
struct
inode
*
ip
,
struct
stat
*
st
);
int
readi
(
struct
inode
*
ip
,
char
*
xdst
,
uint
off
,
uint
n
);
int
writei
(
struct
inode
*
ip
,
char
*
addr
,
uint
off
,
uint
n
);
struct
inode
*
mknod
(
char
*
,
short
,
short
,
short
);
struct
inode
*
mknod1
(
struct
inode
*
,
char
*
,
short
,
short
,
short
);
int
unlink
(
char
*
cp
);
void
iupdate
(
struct
inode
*
ip
);
int
link
(
char
*
file1
,
char
*
file2
);
struct
inode
*
iget
(
uint
,
uint
);
void
ilock
(
struct
inode
*
);
void
iunlock
(
struct
inode
*
);
void
itrunc
(
struct
inode
*
);
void
idecref
(
struct
inode
*
);
void
iincref
(
struct
inode
*
);
void
iput
(
struct
inode
*
);
struct
inode
*
namei
(
char
*
,
int
,
uint
*
,
char
**
,
struct
inode
**
);
void
stati
(
struct
inode
*
,
struct
stat
*
);
int
readi
(
struct
inode
*
,
char
*
,
uint
,
uint
);
int
writei
(
struct
inode
*
,
char
*
,
uint
,
uint
);
struct
inode
*
mknod
(
char
*
,
short
,
short
,
short
);
struct
inode
*
mknod1
(
struct
inode
*
,
char
*
,
short
,
short
,
short
);
int
unlink
(
char
*
);
void
iupdate
(
struct
inode
*
);
int
link
(
char
*
,
char
*
);
编写
预览
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论