preadtest command-line option to enable syscall hacks

上级 a2ab32e5
......@@ -13,6 +13,8 @@
#define BSIZE 4096
#define PSIZE (4*BSIZE)
static int usekernlet;
static char buf[BSIZE];
struct ipcctl *ipcctl = (struct ipcctl*)KSHARED;
......@@ -57,6 +59,9 @@ main(int ac, char **av)
int i, k;
int fd;
if (ac > 1)
usekernlet = av[1][0] == 'k';
fd = open("preadtest.x", O_CREATE|O_RDWR);
if (fd < 0)
die("open failed");
......@@ -75,6 +80,7 @@ main(int ac, char **av)
}
t1 = rdtsc();
printf(1, "usekernlet %u\n", usekernlet);
printf(1, "cycles %lu\n", t1 - t0);
exit();
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论