Operating Systems
Figure2.1
#include<stdio.h>
#include<stdlib.h>
#include<sys/time.h>
#include<assert.h>
#include"common.h"
int main(int argc,char*argv[]){
if(argc!=2){
fprintf(stderr, "usage:cpu<string>\n");
exit(1);
}
char *str=argv[1];
while(1){
Spin(1);
printf("%s\n",str);
}
return 0;
}
需要從
code.threads-intro.tgz 下載,可以用上寫過的py軟體

Figure2.2只需要&,;去除



https://bbs.csdn.net/topics/280002263 雖然不算寫時復制,很好的解決了想的問題:一樣的地址映射不同物理地址,

是包中的common_threads.h頭檔案.
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/45262.html
標籤:其他
