From 140a67c13aad2595ee6c72e41d14d35a793158b5 Mon Sep 17 00:00:00 2001 From: Antonio Argenziano Date: Tue, 10 Jul 2018 16:45:26 -0700 Subject: lib/gt: Make use of dummyload library to create recursive batch An hanging batch is nothing more than a spinning batch that never gets stopped, so re-use the routines implemented in dummyload.c. v2: Let caller decide spin loop size v3: Only use loose loops for hangs (Chris) v4: No requires v5: Free the spinner v6: Chamelium exists. Signed-off-by: Antonio Argenziano #v3 Signed-off-by: Chris Wilson Reviewed-by: Antonio Argenziano --- lib/igt_core.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/igt_core.h') diff --git a/lib/igt_core.h b/lib/igt_core.h index a73b0649..aaf1b626 100644 --- a/lib/igt_core.h +++ b/lib/igt_core.h @@ -1005,4 +1005,8 @@ void igt_kmsg(const char *format, ...); #define READ_ONCE(x) (*(volatile typeof(x) *)(&(x))) +#define MSEC_PER_SEC (1000) +#define USEC_PER_SEC (1000*MSEC_PER_SEC) +#define NSEC_PER_SEC (1000*USEC_PER_SEC) + #endif /* IGT_CORE_H */ -- cgit v1.2.3