4 * Used as a helper to test AST delivery. Loops in user mode for a few
5 * seconds. This one forks and runs the loop in two processes.
7 * $DragonFly: src/test/sysperf/loop2.c,v 1.2 2006/04/22 22:32:52 dillon Exp $
16 main(int ac
, char **av
)
24 count
= strtoul(av
[1], NULL
, 0);
26 printf("SMP contention, userland-only loop, duel-forks. Run just one\n");
30 for (i
= count
; i
> 0; --i
) {
31 for (j
= INNER
; j
> 0; --j
)
36 for (i
= count
; i
> 0; --i
) {
37 for (j
= INNER
; j
> 0; --j
)
40 while (wait(NULL
) > 0)
42 stop_timing(LOOP
, "loop2/2xfork");