Lines Matching full:depth
80 #define DEPTH 5 macro
96 volatile bool exiting[DEPTH];
126 static void child(struct shared_state *ss, int depth);
129 child_fork(struct shared_state *ss, int depth) in child_fork() argument
135 child(ss, depth); in child_fork()
170 child_verify(struct shared_state *ss, int depth, int newval, int oldval) in child_verify() argument
181 depth, foundval, expectval, oldval); in child_verify()
186 child(struct shared_state *ss, int depth) in child() argument
190 if (depth < 1 || depth >= DEPTH) in child()
191 child_errx("Bad depth %d", depth); in child()
193 dprintf("P%d (pid %d) started\n", depth, mypid); in child()
194 switch (depth) { in child()
226 child_fork(ss, depth + 1); in child()
229 child_verify(ss, depth, mypid, mypid); in child()
255 pid = child_fork(ss, depth + 1); in child()
269 child_verify(ss, depth, pid, oldval); in child()
301 child_verify(ss, depth, oldval, oldval); in child()
304 child_errx("Bad depth %d", depth); in child()
307 dprintf("P%d (pid %d) exiting\n", depth, mypid); in child()
308 ss->exiting[depth] = true; in child()