Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
xv6-public
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
问题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
银宸时代
OS Lab Group
奖励实验
xv6-public
提交
66991942
提交
66991942
4月 07, 2012
创建
作者:
Austin Clements
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Mark all syscall functions with a special comment
上级
1c260e53
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
35 行增加
和
0 行删除
+35
-0
async.cc
kernel/async.cc
+1
-0
script.cc
kernel/script.cc
+1
-0
sysfile.cc
kernel/sysfile.cc
+18
-0
sysproc.cc
kernel/sysproc.cc
+14
-0
uwq.cc
kernel/uwq.cc
+1
-0
没有找到文件。
kernel/async.cc
浏览文件 @
66991942
...
...
@@ -52,6 +52,7 @@ pread_allocwork(struct inode *ip, size_t count, off_t off,
return
w
;
}
//SYSCALL
int
sys_async
(
int
fd
,
size_t
count
,
off_t
off
,
int
msgid
,
int
pageid
)
...
...
kernel/script.cc
浏览文件 @
66991942
...
...
@@ -28,6 +28,7 @@ script_mmap_work(void *a0, void *a1, void *a2, void *a3)
*
donep
+=
1
;
}
//SYSCALL
int
sys_script
(
void
*
addr
,
u64
len
,
u64
chunk
)
{
...
...
kernel/sysfile.cc
浏览文件 @
66991942
...
...
@@ -28,6 +28,7 @@ fdalloc(file *f)
return
myproc
()
->
ftable
->
allocfd
(
f
);
}
//SYSCALL
int
sys_dup
(
int
ofd
)
{
...
...
@@ -44,6 +45,7 @@ sys_dup(int ofd)
return
fd
;
}
//SYSCALL
ssize_t
sys_read
(
int
fd
,
void
*
p
,
size_t
n
)
{
...
...
@@ -54,6 +56,7 @@ sys_read(int fd, void *p, size_t n)
return
f
->
read
(
static_cast
<
char
*>
(
p
),
n
);
}
//SYSCALL
ssize_t
sys_pread
(
int
fd
,
void
*
ubuf
,
size_t
count
,
off_t
offset
)
{
...
...
@@ -70,6 +73,7 @@ sys_pread(int fd, void *ubuf, size_t count, off_t offset)
return
f
->
pread
((
char
*
)
ubuf
,
count
,
offset
);
}
//SYSCALL
ssize_t
sys_write
(
int
fd
,
const
void
*
p
,
size_t
n
)
{
...
...
@@ -80,6 +84,7 @@ sys_write(int fd, const void *p, size_t n)
return
f
->
write
(
static_cast
<
const
char
*>
(
p
),
n
);
}
//SYSCALL
int
sys_close
(
int
fd
)
{
...
...
@@ -91,6 +96,7 @@ sys_close(int fd)
return
0
;
}
//SYSCALL
int
sys_fstat
(
int
fd
,
struct
stat
*
st
)
{
...
...
@@ -102,6 +108,7 @@ sys_fstat(int fd, struct stat *st)
}
// Create the path new as a link to the same inode as old.
//SYSCALL
int
sys_link
(
const
char
*
old
,
const
char
*
newn
)
{
...
...
@@ -155,6 +162,7 @@ isdirempty(struct inode *dp)
return
empty
;
}
//SYSCALL
int
sys_unlink
(
const
char
*
path
)
{
...
...
@@ -266,6 +274,7 @@ create(inode *cwd, const char *path, short type, short major, short minor)
return
ip
;
}
//SYSCALL
int
sys_openat
(
int
dirfd
,
const
char
*
path
,
int
omode
)
{
...
...
@@ -363,6 +372,7 @@ sys_openat(int dirfd, const char *path, int omode)
return
fd
;
}
//SYSCALL
int
sys_mkdirat
(
int
dirfd
,
const
char
*
path
)
{
...
...
@@ -388,6 +398,7 @@ sys_mkdirat(int dirfd, const char *path)
return
0
;
}
//SYSCALL
int
sys_mknod
(
const
char
*
path
,
int
major
,
int
minor
)
{
...
...
@@ -401,6 +412,7 @@ sys_mknod(const char *path, int major, int minor)
return
0
;
}
//SYSCALL
int
sys_chdir
(
const
char
*
path
)
{
...
...
@@ -419,6 +431,7 @@ sys_chdir(const char *path)
return
0
;
}
//SYSCALL
int
sys_exec
(
const
char
*
upath
,
userptr
<
userptr
<
const
char
>
>
uargv
)
{
...
...
@@ -456,6 +469,7 @@ clean:
return
r
;
}
//SYSCALL
int
sys_pipe
(
int
*
fd
)
{
...
...
@@ -522,6 +536,7 @@ allocsocket(struct file **rf, int *rfd)
return
0
;
}
//SYSCALL
int
sys_socket
(
int
domain
,
int
type
,
int
protocol
)
{
...
...
@@ -543,6 +558,7 @@ sys_socket(int domain, int type, int protocol)
return
fd
;
}
//SYSCALL
int
sys_bind
(
int
xsock
,
const
struct
sockaddr
*
xaddr
,
int
xaddrlen
)
{
...
...
@@ -555,6 +571,7 @@ sys_bind(int xsock, const struct sockaddr *xaddr, int xaddrlen)
return
netbind
(
f
->
socket
,
xaddr
,
xaddrlen
);
}
//SYSCALL
int
sys_listen
(
int
xsock
,
int
backlog
)
{
...
...
@@ -567,6 +584,7 @@ sys_listen(int xsock, int backlog)
return
netlisten
(
f
->
socket
,
backlog
);
}
//SYSCALL
int
sys_accept
(
int
xsock
,
struct
sockaddr
*
xaddr
,
int
*
xaddrlen
)
{
...
...
kernel/sysproc.cc
浏览文件 @
66991942
...
...
@@ -12,6 +12,7 @@
#include "kmtrace.hh"
#include "futex.h"
//SYSCALL
int
sys_fork
(
int
flags
)
{
...
...
@@ -19,6 +20,7 @@ sys_fork(int flags)
return
fork
(
flags
);
}
//SYSCALL
int
sys_exit
(
void
)
{
...
...
@@ -26,6 +28,7 @@ sys_exit(void)
panic
(
"exit() returned"
);
}
//SYSCALL
int
sys_wait
(
void
)
{
...
...
@@ -33,18 +36,21 @@ sys_wait(void)
return
wait
();
}
//SYSCALL
int
sys_kill
(
int
pid
)
{
return
proc
::
kill
(
pid
);
}
//SYSCALL
int
sys_getpid
(
void
)
{
return
myproc
()
->
pid
;
}
//SYSCALL
char
*
sys_sbrk
(
int
n
)
{
...
...
@@ -55,6 +61,7 @@ sys_sbrk(int n)
return
(
char
*
)
addr
;
}
//SYSCALL
int
sys_nsleep
(
u64
nsec
)
{
...
...
@@ -83,12 +90,14 @@ sys_nsleep(u64 nsec)
// return how many clock tick interrupts have occurred
// since boot.
//SYSCALL
u64
sys_uptime
(
void
)
{
return
nsectime
();
}
//SYSCALL
int
sys_map
(
userptr
<
void
>
addr
,
size_t
len
)
{
...
...
@@ -114,6 +123,7 @@ sys_map(userptr<void> addr, size_t len)
return
r
;
}
//SYSCALL
int
sys_unmap
(
userptr
<
void
>
addr
,
size_t
len
)
{
...
...
@@ -134,6 +144,7 @@ sys_unmap(userptr<void> addr, size_t len)
return
0
;
}
//SYSCALL
int
sys_halt
(
void
)
{
...
...
@@ -145,6 +156,7 @@ sys_halt(void)
return
0
;
}
//SYSCALL
int
sys_setfs
(
u64
base
)
{
...
...
@@ -154,12 +166,14 @@ sys_setfs(u64 base)
return
0
;
}
//SYSCALL
int
sys_setaffinity
(
int
cpu
)
{
return
myproc
()
->
set_cpu_pin
(
cpu
);
}
//SYSCALL
long
sys_futex
(
const
u64
*
addr
,
int
op
,
u64
val
,
u64
timer
)
{
...
...
kernel/uwq.cc
浏览文件 @
66991942
...
...
@@ -52,6 +52,7 @@ uwq_trywork(void)
return
false
;
}
//SYSCALL
int
sys_wqwait
(
void
)
{
...
...
编写
预览
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论