summaryrefslogtreecommitdiff
path: root/tests/i915/gem_exec_reloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/i915/gem_exec_reloc.c')
-rw-r--r--tests/i915/gem_exec_reloc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/i915/gem_exec_reloc.c b/tests/i915/gem_exec_reloc.c
index fda71dd2..2a18c3b2 100644
--- a/tests/i915/gem_exec_reloc.c
+++ b/tests/i915/gem_exec_reloc.c
@@ -916,8 +916,10 @@ static int __execbuf(int i915, struct drm_i915_gem_execbuffer2 *execbuf)
return err;
}
+static int stop;
static void sighandler(int sig)
{
+ stop = 1;
}
static void parallel_child(int i915,
@@ -947,7 +949,7 @@ static void parallel_child(int i915,
unsigned long count = 0;
sigaction(SIGINT, &act, NULL);
- for (;;) {
+ while (!READ_ONCE(stop)) {
int err = __execbuf(i915, &execbuf);
if (err == -EINTR)
break;
@@ -977,6 +979,7 @@ static void parallel(int i915)
reloc = parallel_relocs(32 * 1024, &reloc_sz);
+ stop = 0;
__for_each_physical_engine(i915, e) {
igt_fork(child, 1)
parallel_child(i915, e, reloc, common);