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