4 * Used to test syscall mpsafeness, with editing
6 * $DragonFly: src/test/sysperf/loop4.c,v 1.1 2008/05/09 15:49:42 dillon Exp $
14 void doloop(int count);
19 main(int ac, char **av)
28 nfork = strtoul(av[1], NULL, 0);
30 printf("SMP contention, dup() + close(), Run just one\n");
34 while (stop_timing(0, NULL) == 0) {
38 printf("loop %d times\n", count);
41 for (i = 1; i < nfork; ++i) {
48 while (wait(NULL) > 0)
50 stop_timing(count * INNER, "loop2/2xfork");
59 int fd = open("/usr/share/dict/words", O_RDONLY);
60 register void (*func)(void) = func_nop1;
64 for (i = count; i > 0; --i) {
65 for (j = INNER; j > 0; --j) {