diff options
author | Frans Kaashoek <kaashoek@fransk-6.local> | 2010-07-02 14:51:53 -0400 |
---|---|---|
committer | Frans Kaashoek <kaashoek@fransk-6.local> | 2010-07-02 14:51:53 -0400 |
commit | 40889627ba50db29a64bc6a1553c2b21e6a99b78 (patch) | |
tree | 7cb8f51492af706cafdcaf1b01a5cac8073d5a38 /forktest.c | |
parent | b7a517f2277670e156f150ee2cb7aae6426c6aef (diff) | |
download | xv6-labs-40889627ba50db29a64bc6a1553c2b21e6a99b78.tar.gz xv6-labs-40889627ba50db29a64bc6a1553c2b21e6a99b78.tar.bz2 xv6-labs-40889627ba50db29a64bc6a1553c2b21e6a99b78.zip |
Initial version of single-cpu xv6 with page tables
Diffstat (limited to 'forktest.c')
-rw-r--r-- | forktest.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -5,6 +5,8 @@ #include "stat.h" #include "user.h" +#define N 1000 + void printf(int fd, char *s, ...) { @@ -18,7 +20,7 @@ forktest(void) printf(1, "fork test\n"); - for(n=0; n<1000; n++){ + for(n=0; n<N; n++){ pid = fork(); if(pid < 0) break; @@ -26,8 +28,8 @@ forktest(void) exit(); } - if(n == 1000){ - printf(1, "fork claimed to work 1000 times!\n"); + if(n == N){ + printf(1, "fork claimed to work N times!\n", N); exit(); } |