Merge commit 'crater/master'
[dragonfly.git] / test / sysperf / call2.c
blob2dfb2cd72975105310b956f8c445bcd54d39277e
1 /*
2 * call2.c
4 * Test a standard function call to a function which does nothing much.
6 * $DragonFly: src/test/sysperf/call2.c,v 1.2 2005/08/02 17:11:04 hmp Exp $
7 */
9 #include "blib.h"
11 #define LOOP 1000000000
13 static void xnop(void) { }
15 static void (*xnop_ptr)(void) = xnop;
17 int
18 main(int ac, char **av)
20 int i;
22 printf("call nop() function through function pointer in loop\n");
23 start_timing();
24 for (i = 0; i < LOOP; ++i)
25 xnop_ptr();
26 stop_timing(LOOP, "loop1/user");
27 return(0);