Merge branch 'for-jens' of git://git.drbd.org/linux-2.6-drbd into for-linus
[cascardo/linux.git] / tools / perf / bench / sched-pipe.c
index 238185f..4f77c7c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- * builtin-bench-pipe.c
+ * sched-pipe.c
  *
  * pipe: Benchmark for pipe()
  *
@@ -87,7 +87,8 @@ int bench_sched_pipe(int argc, const char **argv,
        if (pid) {
                retpid = waitpid(pid, &wait_stat, 0);
                assert((retpid == pid) && WIFEXITED(wait_stat));
-               return 0;
+       } else {
+               exit(0);
        }
 
        switch (bench_format) {
@@ -99,7 +100,8 @@ int bench_sched_pipe(int argc, const char **argv,
                result_usec += diff.tv_usec;
 
                printf(" %14s: %lu.%03lu [sec]\n\n", "Total time",
-                      diff.tv_sec, diff.tv_usec/1000);
+                      diff.tv_sec,
+                      (unsigned long) (diff.tv_usec/1000));
 
                printf(" %14lf usecs/op\n",
                       (double)result_usec / (double)loops);
@@ -110,7 +112,8 @@ int bench_sched_pipe(int argc, const char **argv,
 
        case BENCH_FORMAT_SIMPLE:
                printf("%lu.%03lu\n",
-                      diff.tv_sec, diff.tv_usec / 1000);
+                      diff.tv_sec,
+                      (unsigned long) (diff.tv_usec / 1000));
                break;
 
        default: