Try putting getpid() here too.
> gettimeofday(&tv1, 0);
> getuid(); <--- here
> gettimeofday(&tv2, 0);
>
> printf("Time1: %d:%d\n", tv1.tv_sec, tv1.tv_usec);
> printf("Time2: %d:%d\n", tv2.tv_sec, tv2.tv_usec);
> }
The first gettimeofday will warm the caches. If I pre-call getpid(), I get the
same speed for both.
J
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/