igt_core: Refactor igt_stop_helper() to use igt_wait_helper()

Reduce code duplication as the igt_stop_helper can reuse
igt_wait_helper() to replace its own waiting routine.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson
2014-07-24 11:44:45 +01:00
parent bd3cf81e98
commit 745945546f
3 changed files with 34 additions and 41 deletions
+5 -1
View File
@@ -253,8 +253,12 @@ static void load_helper_run(enum load load)
static void load_helper_stop(void)
{
int status;
kill(lh.igt_proc.pid, SIGUSR1);
igt_wait_helper(&lh.igt_proc);
status = igt_wait_helper(&lh.igt_proc);
igt_assert(WIFSIGNALED(status) && WTERMSIG(status) == SIGUSR1);
}
static void load_helper_init(void)