From f650aa2dd640a4a8941bae90fbd85c83da5fbb1c Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 20 Apr 2016 18:35:37 +0100 Subject: igt/gem_close_race: Batify Signed-off-by: Chris Wilson --- lib/igt_aux.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/igt_aux.h') diff --git a/lib/igt_aux.h b/lib/igt_aux.h index cdaed297..f66de721 100644 --- a/lib/igt_aux.h +++ b/lib/igt_aux.h @@ -51,6 +51,9 @@ bool igt_sigiter_continue(struct igt_sigiter *iter, bool interrupt); #define igt_interruptible(E) \ for (struct igt_sigiter iter__={}; igt_sigiter_continue(&iter__, (E)); ) +#define igt_timeout(T) \ + for (struct timespec t__={}; igt_seconds_elapsed(&t__) < (T); ) + void igt_exchange_int(void *array, unsigned i, unsigned j); void igt_permute_array(void *array, unsigned size, void (*exchange_func)(void *array, -- cgit v1.2.3