摘要: 1. Overview 要为xv6添加一个系统调用,需要修改以下5个文件: syscall.h syscall.c sysproc.c usys.S user.h 由于Unix v6发行于1975年,下面我们以添加一个返回整数1975的系统调用作为示范来说明如何为xv6添加一个系统调用。 2. sy 阅读全文
posted @ 2022-01-26 17:34 刷书狂魔 阅读(941) 评论(0) 推荐(0) 编辑
摘要: 编写代码 创建一个名为hello.c的文件: // 该程序将向屏幕输出一句hello #include "types.h" #include "user.h" int main(int argc, char *argv[]) { printf(1, "hello, my name is '%s'.\ 阅读全文
posted @ 2022-01-26 14:49 刷书狂魔 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 1. 下载xv6 从github上拉取xv6的源码: $ git clone git://github.com/mit-pdos/xv6-public.git 2. 下载qemu 在Ubuntu下使用apt-get,其他发行版自行搜索如何下载: $ sudo apt-get install qemu 阅读全文
posted @ 2022-01-26 12:14 刷书狂魔 阅读(792) 评论(1) 推荐(0) 编辑
总访问: counter for blog 次