其他分享
首页 > 其他分享> > 6.S081 LAB1

6.S081 LAB1

作者:互联网

LAB链接:https://pdos.csail.mit.edu/6.S081/2020/labs/util.html

#sleep

sleep程序代码如下:

#include "kernel/types.h"
#include "kernel/stat.h"
#include "user/user.h"

int main(int argc, char *argv[]){
    if (argc != 2){
        fprintf(2,"usage:sleep<number>\n");
        exit(1);
    }

    int t = atoi(argv[1]);
    sleep(t);
    exit(0);
}

标签:kernel,include,int,argv,LAB1,sleep,argc,S081
来源: https://www.cnblogs.com/Kyo-Kyo/p/15361518.html