public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [i-g-t PATCH v10 1/5] lib: Make signal helper definitions reusable
Date: Wed, 23 Nov 2016 12:59:39 +0200	[thread overview]
Message-ID: <20161123105943.5157-2-abdiel.janulgue@linux.intel.com> (raw)
In-Reply-To: <20161123105943.5157-1-abdiel.janulgue@linux.intel.com>

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(-)

diff --git a/benchmarks/gem_syslatency.c b/benchmarks/gem_syslatency.c
index 6cad3a0..83bfac7 100644
--- a/benchmarks/gem_syslatency.c
+++ b/benchmarks/gem_syslatency.c
@@ -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);
diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index 421f6d4..b5ae854 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -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;
diff --git a/lib/igt_aux.h b/lib/igt_aux.h
index d30196b..d4da499 100644
--- a/lib/igt_aux.h
+++ b/lib/igt_aux.h
@@ -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);
diff --git a/lib/igt_core.c b/lib/igt_core.c
index 9cd5f98..f64c809 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -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;
diff --git a/tests/drv_hangman.c b/tests/drv_hangman.c
index f80d65d..db0a077 100644
--- a/tests/drv_hangman.c
+++ b/tests/drv_hangman.c
@@ -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;
-- 
2.9.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-11-23 10:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-23 10:59 i-g-t dummyload/spin batch v10 Abdiel Janulgue
2016-11-23 10:59 ` Abdiel Janulgue [this message]
2016-11-23 10:59 ` [i-g-t PATCH v10 2/5] lib: add igt_dummyload Abdiel Janulgue
2016-11-23 11:47   ` Chris Wilson
2016-11-23 15:53     ` [i-g-t PATCH v11 " Abdiel Janulgue
2016-11-23 16:17       ` Chris Wilson
2016-11-24 10:16         ` [i-g-t PATCH v12 " Abdiel Janulgue
2016-11-25  9:17           ` Chris Wilson
2016-11-25 11:40             ` [i-g-t PATCH 2/6] igt_aux: Add some list helpers from the kernel Abdiel Janulgue
2016-11-25 11:40               ` [i-g-t PATCH v13 3/6] lib: add igt_dummyload Abdiel Janulgue
2016-11-25 11:52               ` [i-g-t PATCH 2/6] igt_aux: Add some list helpers from the kernel Chris Wilson
2016-11-25 11:54               ` Chris Wilson
2016-11-25 14:41                 ` [i-g-t PATCH 2/6] igt_aux: Add some list helpers from wayland Abdiel Janulgue
2016-11-25 14:41                   ` [i-g-t PATCH v14 3/6] lib: add igt_dummyload Abdiel Janulgue
2016-11-25 15:19                     ` Chris Wilson
2016-11-28  7:37                       ` [i-g-t PATCH v15 " Abdiel Janulgue
2016-11-23 10:59 ` [i-g-t PATCH v10 3/5] igt/gem_wait: Use new igt_spin_batch Abdiel Janulgue
2016-11-23 10:59 ` [i-g-t PATCH v10 4/5] igt/kms_flip: " Abdiel Janulgue
2016-11-23 11:35   ` Chris Wilson
2016-11-23 10:59 ` [i-g-t PATCH v10 5/5] igt/kms_busy.c: " Abdiel Janulgue

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161123105943.5157-2-abdiel.janulgue@linux.intel.com \
    --to=abdiel.janulgue@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox