提交 fdbfb8dc 创建 作者: Silas Boyd-Wickizer's avatar Silas Boyd-Wickizer

Merge branch 'scale-amd64' of git+ssh://amsterdam.csail.mit.edu/home/am0/6.828/xv6 into scale-amd64

...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
static struct uspinlock l; static struct uspinlock l;
static volatile int tcount; static volatile int tcount;
enum { nthread = 4 };
enum { readaccess = 0 }; enum { readaccess = 0 };
void void
...@@ -40,12 +39,19 @@ thr(void *arg) ...@@ -40,12 +39,19 @@ thr(void *arg)
} }
int int
main(void) main(int ac, char **av)
{ {
mtenable("xv6-mapbench"); mtenable("xv6-mapbench");
if (ac != 2) {
printf(1, "usage: %s nthreads\n", av[0]);
exit();
}
int nthread = atoi(av[1]);
acquire(&l); acquire(&l);
printf(1, "mapbench[%d]: start esp %x\n", getpid(), rrsp()); printf(1, "mapbench[%d]: start esp %x, nthread=%d\n", getpid(), rrsp(), nthread);
for(int i = 0; i < nthread; i++) { for(int i = 0; i < nthread; i++) {
sbrk(8192); sbrk(8192);
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论