提交 66991942 创建 作者: Austin Clements's avatar Austin Clements

Mark all syscall functions with a special comment

上级 1c260e53
......@@ -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)
......
......@@ -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)
{
......
......@@ -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)
{
......
......@@ -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)
{
......
......@@ -52,6 +52,7 @@ uwq_trywork(void)
return false;
}
//SYSCALL
int
sys_wqwait(void)
{
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论