@@ -133,10 +133,6 @@ static void *gem_busyspin(void *arg)
return NULL;
}
-#define MSEC_PER_SEC (1000)
-#define USEC_PER_SEC (1000 * MSEC_PER_SEC)
-#define NSEC_PER_SEC (1000 * USEC_PER_SEC)
-
static double elapsed(const struct timespec *a, const struct timespec *b)
{
return 1e9*(b->tv_sec - a->tv_sec) + (b->tv_nsec - a ->tv_nsec);
@@ -75,17 +75,6 @@
* fit into any other topic.
*/
-
-/* signal interrupt helpers */
-
-#define MSEC_PER_SEC (1000)
-#define USEC_PER_SEC (1000*MSEC_PER_SEC)
-#define NSEC_PER_SEC (1000*USEC_PER_SEC)
-
-/* signal interrupt helpers */
-#define gettid() syscall(__NR_gettid)
-#define sigev_notify_thread_id _sigev_un._tid
-
static struct __igt_sigiter_global {
pid_t tid;
timer_t timer;
@@ -35,6 +35,16 @@
extern drm_intel_bo **trash_bos;
extern int num_trash_bos;
+/* signal interrupt helpers */
+
+#define MSEC_PER_SEC (1000)
+#define USEC_PER_SEC (1000*MSEC_PER_SEC)
+#define NSEC_PER_SEC (1000*USEC_PER_SEC)
+
+/* signal interrupt helpers */
+#define gettid() syscall(__NR_gettid)
+#define sigev_notify_thread_id _sigev_un._tid
+
/* auxialiary igt helpers from igt_aux.c */
/* generally useful helpers */
void igt_fork_signal_helper(void);
@@ -398,9 +398,6 @@ error:
return -errno;
}
-#define MSEC_PER_SEC (1000)
-#define USEC_PER_SEC (1000*MSEC_PER_SEC)
-#define NSEC_PER_SEC (1000*USEC_PER_SEC)
uint64_t igt_nsec_elapsed(struct timespec *start)
{
struct timespec now;
@@ -293,7 +293,6 @@ static void test_error_state_capture(unsigned ring_id,
* case and it takes a lot more time to wrap, so the acthd can potentially keep
* increasing for a long time
*/
-#define NSEC_PER_SEC 1000000000LL
static void hangcheck_unterminated(void)
{
int fd;
Lots of test cases are re-declaring this. v2: Remove definition in benchmarks/gem_syslatency.c Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> --- benchmarks/gem_syslatency.c | 4 ---- lib/igt_aux.c | 11 ----------- lib/igt_aux.h | 10 ++++++++++ lib/igt_core.c | 3 --- tests/drv_hangman.c | 1 - 5 files changed, 10 insertions(+), 19 deletions(-)