From d7050f9f79fee8fb7c790f355c984d9e5141e1c5 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Wed, 11 May 2016 17:06:28 +0200 Subject: lib/igt_aux: Polish docs for igt_interruptible - Give __ prefix to internal funcstion and structs, only igt_interruptible is used by tests. - Move docs to igt_interruptible and adjust. - Explain more clearly how the timeout is getting doubled each iteration until no more interruptions happen. Also rename the argument to give it a more meaningful name in the docs. - Link from other functions to this one for cross-referencing. - Rename to igt_do_interruptible to make it clearer it's a loop, inspired by do {} while () loops. v2: Rename instead to igt_while_interruptible and fix typos (Chris). And add gtk-doc for igt_ioctl, too. Acked-by: Chris Wilson Signed-off-by: Daniel Vetter --- tests/gem_exec_flush.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/gem_exec_flush.c') diff --git a/tests/gem_exec_flush.c b/tests/gem_exec_flush.c index 705ef849..93265ae5 100644 --- a/tests/gem_exec_flush.c +++ b/tests/gem_exec_flush.c @@ -216,7 +216,7 @@ overwrite: if (flags & SET_DOMAIN) { unsigned domain = flags & WC ? I915_GEM_DOMAIN_GTT : I915_GEM_DOMAIN_CPU; - igt_interruptible(flags & INTERRUPTIBLE) + igt_while_interruptible(flags & INTERRUPTIBLE) gem_set_domain(fd, obj[0].handle, domain, (flags & WRITE) ? domain : 0); @@ -230,7 +230,7 @@ overwrite: } else if (flags & KERNEL) { uint32_t val; - igt_interruptible(flags & INTERRUPTIBLE) + igt_while_interruptible(flags & INTERRUPTIBLE) gem_read(fd, obj[0].handle, i*sizeof(uint32_t), &val, sizeof(val)); @@ -242,13 +242,13 @@ overwrite: if (flags & WRITE) { val = 0xdeadbeef; - igt_interruptible(flags & INTERRUPTIBLE) + igt_while_interruptible(flags & INTERRUPTIBLE) gem_write(fd, obj[0].handle, i*sizeof(uint32_t), &val, sizeof(val)); } } else { - igt_interruptible(flags & INTERRUPTIBLE) + igt_while_interruptible(flags & INTERRUPTIBLE) gem_sync(fd, obj[0].handle); if (!(flags & (BEFORE | COHERENT)) && -- cgit v1.2.3