summaryrefslogtreecommitdiff
path: root/lib/drmtest.h
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-09-10 15:46:08 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-09-10 17:40:06 +0200
commitedd723457c5b3488a26167087f8b3b3045944804 (patch)
tree4252a437285009312743e72917907d401388a4ab /lib/drmtest.h
parent2096649053cf720258d66095af0c54453727e841 (diff)
lib/drmtest: create helpers for forking helper threads
The upshot is that we can share the logic to make sure the helpers are all properly stoved again in a 2nd step. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib/drmtest.h')
-rw-r--r--lib/drmtest.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/drmtest.h b/lib/drmtest.h
index f55825e7..f6efe5d4 100644
--- a/lib/drmtest.h
+++ b/lib/drmtest.h
@@ -221,6 +221,15 @@ bool __igt_fork(void);
for (; __igt_fork(); exit(0))
void igt_waitchildren(void);
+struct igt_helper_process {
+ bool running;
+ pid_t pid;
+};
+bool __igt_fork_helper(struct igt_helper_process *proc);
+void igt_stop_helper(struct igt_helper_process *proc);
+#define igt_fork_helper(proc) \
+ for (; __igt_fork_helper(proc); exit(0))
+
/* check functions which auto-skip tests by calling igt_skip() */
void gem_require_caching(int fd);
static inline void gem_require_ring(int fd, int ring_id)