1 /* 2 * syscall2.c 3 * 4 * $DragonFly: src/test/sysperf/syscall2.c,v 1.1 2003/08/12 02:29:44 dillon Exp $ 5 */ 6 7 #include "blib.h" 8 9 extern int getuid_msg(void); 10 11 int 12 main(int ac, char **av) 13 { 14 long long count = 0; 15 long long max; 16 int j; 17 18 printf("timing getuid_msg syscall\n"); 19 20 start_timing(); 21 while (stop_timing(0, NULL) == 0) { 22 for (j = 0; j < 100; ++j) 23 getuid_msg(); 24 count += 100; 25 } 26 max = count; 27 start_timing(); 28 for (count = 0; count < max; count += 100) { 29 for (j = 0; j < 100; ++j) 30 getuid_msg(); 31 } 32 stop_timing(count, "getuid()"); 33 return(0); 34 } 35 36