Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
xv6-public
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
问题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
银宸时代
OS Lab Group
奖励实验
xv6-public
提交
649bc99f
提交
649bc99f
8月 23, 2007
创建
作者:
rsc
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
align, sort
上级
b1fb19b6
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
121 行增加
和
124 行删除
+121
-124
defs.h
defs.h
+121
-124
没有找到文件。
defs.h
浏览文件 @
649bc99f
// kalloc.c
struct
buf
;
char
*
kalloc
(
int
);
struct
file
;
void
kfree
(
char
*
,
int
);
struct
inode
;
void
kinit
(
void
);
struct
jmpbuf
;
struct
pipe
;
// console.c
void
console_init
(
void
);
void
cprintf
(
char
*
,
...);
void
panic
(
char
*
)
__attribute__
((
noreturn
));
void
kbd_intr
(
void
);
// proc.c
void
pinit
(
void
);
struct
proc
;
struct
proc
;
void
setupsegs
(
struct
proc
*
);
struct
proc
*
copyproc
(
struct
proc
*
);
struct
spinlock
;
struct
spinlock
;
int
growproc
(
int
);
struct
stat
;
void
sleep
(
void
*
,
struct
spinlock
*
);
struct
uinode
;
void
wakeup
(
void
*
);
void
scheduler
(
void
);
void
proc_exit
(
void
);
int
proc_kill
(
int
);
int
proc_wait
(
void
);
void
yield
(
void
);
void
procdump
(
void
);
void
userinit
(
void
);
// setjmp.S
struct
jmpbuf
;
int
setjmp
(
struct
jmpbuf
*
);
void
longjmp
(
struct
jmpbuf
*
);
// trap.c
// 8253pit.c
void
tvinit
(
void
);
void
pit8253_timerinit
(
void
);
void
idtinit
(
void
);
// string.c
// bio.c
void
*
memset
(
void
*
,
int
,
uint
);
void
binit
(
void
);
int
memcmp
(
const
void
*
,
const
void
*
,
uint
);
struct
buf
*
bread
(
uint
,
uint
);
void
*
memmove
(
void
*
,
const
void
*
,
uint
);
void
brelse
(
struct
buf
*
);
int
strncmp
(
const
char
*
,
const
char
*
,
uint
);
void
bwrite
(
struct
buf
*
);
char
*
safestrcpy
(
char
*
,
const
char
*
,
int
);
int
strlen
(
const
char
*
);
// syscall.c
// console.c
void
syscall
(
void
);
void
console_init
(
void
);
int
fetchint
(
struct
proc
*
,
uint
,
int
*
);
void
cprintf
(
char
*
,
...);
int
fetchstr
(
struct
proc
*
,
uint
,
char
**
);
void
kbd_intr
(
void
);
int
argint
(
int
,
int
*
);
void
panic
(
char
*
)
__attribute__
((
noreturn
));
int
argptr
(
int
,
char
**
,
int
);
int
argstr
(
int
,
char
**
);
// picirq.c
// exec.c
void
pic_init
(
void
);
int
exec
(
char
*
,
char
**
);
void
irq_enable
(
int
);
// 8253pit.c
// file.c
void
pit8253_timerinit
(
void
);
struct
file
*
filealloc
(
void
);
void
fileclose
(
struct
file
*
);
void
fileincref
(
struct
file
*
);
void
fileinit
(
void
);
int
fileread
(
struct
file
*
,
char
*
,
int
n
);
int
filestat
(
struct
file
*
,
struct
stat
*
);
int
filewrite
(
struct
file
*
,
char
*
,
int
n
);
// mp.c
// fs.c
extern
int
ismp
;
int
dirlink
(
struct
inode
*
,
char
*
,
uint
);
void
mp_init
(
void
);
struct
uinode
*
dirlookup
(
struct
inode
*
,
char
*
,
uint
*
);
void
mp_startthem
(
void
);
struct
uinode
*
ialloc
(
uint
,
short
);
int
mp_bcpu
(
void
);
struct
uinode
*
idup
(
struct
uinode
*
);
void
iinit
(
void
);
struct
inode
*
ilock
(
struct
uinode
*
);
struct
uinode
*
iunlock
(
struct
inode
*
);
void
iput
(
struct
uinode
*
);
void
iupdate
(
struct
inode
*
);
int
namecmp
(
const
char
*
,
const
char
*
);
struct
uinode
*
namei
(
char
*
);
struct
uinode
*
nameiparent
(
char
*
,
char
*
);
int
readi
(
struct
inode
*
,
char
*
,
uint
,
uint
);
void
stati
(
struct
inode
*
,
struct
stat
*
);
int
writei
(
struct
inode
*
,
char
*
,
uint
,
uint
);
// lapic.c
// ide.c
extern
uint
*
lapicaddr
;
void
ide_init
(
void
);
void
lapic_init
(
int
);
void
ide_intr
(
void
);
void
lapic_startap
(
uchar
,
int
);
void
ide_rw
(
int
,
uint
,
void
*
,
uint
,
int
);
void
lapic_timerinit
(
void
);
void
lapic_timerintr
(
void
);
void
lapic_enableintr
(
void
);
void
lapic_disableintr
(
void
);
void
lapic_eoi
(
void
);
int
cpu
(
void
);
// ioapic.c
// ioapic.c
extern
uchar
ioapic_id
;
void
ioapic_enable
(
int
irq
,
int
cpu
)
;
void
ioapic_init
(
void
)
;
extern
uchar
ioapic_id
;
void
ioapic_enable
(
int
irq
,
int
cpu
);
void
ioapic_init
(
void
);
// spinlock.c
// kalloc.c
struct
spinlock
;
char
*
kalloc
(
int
);
void
initlock
(
struct
spinlock
*
,
char
*
);
void
kfree
(
char
*
,
int
);
void
acquire
(
struct
spinlock
*
);
void
kinit
(
void
);
void
release
(
struct
spinlock
*
);
int
holding
(
struct
spinlock
*
);
// lapic.c
void
getcallerpcs
(
void
*
,
uint
*
);
int
cpu
(
void
);
extern
uint
*
lapicaddr
;
void
lapic_disableintr
(
void
);
void
lapic_enableintr
(
void
);
void
lapic_eoi
(
void
);
void
lapic_init
(
int
);
void
lapic_startap
(
uchar
,
int
);
void
lapic_timerinit
(
void
);
void
lapic_timerintr
(
void
);
// mp.c
extern
int
ismp
;
int
mp_bcpu
(
void
);
void
mp_init
(
void
);
void
mp_startthem
(
void
);
// main.c
// picirq.c
void
load_icode
(
struct
proc
*
,
uchar
*
,
uint
);
void
irq_enable
(
int
);
void
pic_init
(
void
);
// pipe.c
// pipe.c
struct
pipe
;
int
pipe_alloc
(
struct
file
**
,
struct
file
**
);
struct
file
;
void
pipe_close
(
struct
pipe
*
,
int
);
int
pipe_alloc
(
struct
file
**
,
struct
file
**
);
int
pipe_read
(
struct
pipe
*
,
char
*
,
int
);
void
pipe_close
(
struct
pipe
*
,
int
);
int
pipe_write
(
struct
pipe
*
,
char
*
,
int
);
int
pipe_write
(
struct
pipe
*
,
char
*
,
int
);
int
pipe_read
(
struct
pipe
*
,
char
*
,
int
);
// file.c
// proc.c
struct
stat
;
struct
proc
*
copyproc
(
struct
proc
*
);
void
fileinit
(
void
);
int
growproc
(
int
);
struct
file
*
filealloc
(
void
);
void
pinit
(
void
);
void
fileclose
(
struct
file
*
);
void
proc_exit
(
void
);
int
fileread
(
struct
file
*
,
char
*
,
int
n
);
int
proc_kill
(
int
);
int
filewrite
(
struct
file
*
,
char
*
,
int
n
);
int
proc_wait
(
void
);
int
filestat
(
struct
file
*
,
struct
stat
*
);
void
procdump
(
void
);
void
fileincref
(
struct
file
*
);
void
scheduler
(
void
);
void
setupsegs
(
struct
proc
*
);
void
sleep
(
void
*
,
struct
spinlock
*
);
void
userinit
(
void
);
void
wakeup
(
void
*
);
void
yield
(
void
);
// ide.c
// setjmp.S
void
ide_init
(
void
);
void
longjmp
(
struct
jmpbuf
*
);
void
ide_intr
(
void
);
int
setjmp
(
struct
jmpbuf
*
);
void
ide_rw
(
int
,
uint
,
void
*
,
uint
,
int
);
//
bio
.c
//
spinlock
.c
void
binit
(
void
);
void
acquire
(
struct
spinlock
*
);
struct
buf
;
void
getcallerpcs
(
void
*
,
uint
*
)
;
struct
buf
*
bread
(
uint
,
uint
);
int
holding
(
struct
spinlock
*
);
void
bwrite
(
struct
buf
*
);
void
initlock
(
struct
spinlock
*
,
char
*
);
void
brelse
(
struct
buf
*
);
void
release
(
struct
spinlock
*
);
// fs.c
// string.c
struct
inode
;
int
memcmp
(
const
void
*
,
const
void
*
,
uint
);
struct
uinode
;
void
*
memmove
(
void
*
,
const
void
*
,
uint
);
void
iinit
(
void
);
void
*
memset
(
void
*
,
int
,
uint
);
struct
inode
*
ilock
(
struct
uinode
*
);
char
*
safestrcpy
(
char
*
,
const
char
*
,
int
);
struct
uinode
*
iunlock
(
struct
inode
*
);
int
strlen
(
const
char
*
);
void
iput
(
struct
uinode
*
);
int
strncmp
(
const
char
*
,
const
char
*
,
uint
);
struct
uinode
*
idup
(
struct
uinode
*
);
struct
uinode
*
namei
(
char
*
);
void
stati
(
struct
inode
*
,
struct
stat
*
);
int
readi
(
struct
inode
*
,
char
*
,
uint
,
uint
);
int
writei
(
struct
inode
*
,
char
*
,
uint
,
uint
);
int
dirlink
(
struct
inode
*
dp
,
char
*
name
,
uint
ino
);
struct
uinode
*
dirlookup
(
struct
inode
*
dp
,
char
*
name
,
uint
*
poff
);
void
iupdate
(
struct
inode
*
ip
);
int
namecmp
(
const
char
*
s
,
const
char
*
t
);
struct
uinode
*
ialloc
(
uint
,
short
);
struct
uinode
*
nameiparent
(
char
*
path
,
char
*
name
);
// exec.c
// syscall.c
int
exec
(
char
*
,
char
**
);
int
argint
(
int
,
int
*
);
int
argptr
(
int
,
char
**
,
int
);
int
argstr
(
int
,
char
**
);
int
fetchint
(
struct
proc
*
,
uint
,
int
*
);
int
fetchstr
(
struct
proc
*
,
uint
,
char
**
);
void
syscall
(
void
);
// trap.c
void
idtinit
(
void
);
void
tvinit
(
void
);
// number of elements in fixed-size array
// number of elements in fixed-size array
#define NELEM(x) (sizeof(x)/sizeof((x)[0]))
#define NELEM(x) (sizeof(x)/sizeof((x)[0]))
...
...
编写
预览
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论