Module: xenomai-jki
Branch: for-forge
Commit: 8f1df0e80b39e81a926f15afc1f6d8491c4d90f7
URL:    
http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=8f1df0e80b39e81a926f15afc1f6d8491c4d90f7

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Thu Jul 10 16:20:57 2014 +0200

testsuite/latency: Move timerfd init before WARNSW enabling

Creating a timerfd involves Linux syscall. Avoid recording this setup
related mode switch which is just a false positive.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 testsuite/latency/latency.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/testsuite/latency/latency.c b/testsuite/latency/latency.c
index 80cb107..5f90313 100644
--- a/testsuite/latency/latency.c
+++ b/testsuite/latency/latency.c
@@ -102,6 +102,12 @@ static void *latency(void *cookie)
                return NULL;
        }
 
+       tfd = timerfd_create(CLOCK_MONOTONIC, 0);
+       if (tfd == -1) {
+               fprintf(stderr, "latency: timerfd_create: %m\n");
+               return NULL;
+       }
+
 #ifdef CONFIG_XENO_COBALT
        err = pthread_setmode_np(0, PTHREAD_WARNSW, NULL);
        if (err) {
@@ -110,12 +116,6 @@ static void *latency(void *cookie)
        }
 #endif
 
-       tfd = timerfd_create(CLOCK_MONOTONIC, 0);
-       if (tfd == -1) {
-               fprintf(stderr, "latency: timerfd_create: %m\n");
-               return NULL;
-       }
-
        err = clock_gettime(CLOCK_MONOTONIC, &expected);
        if (err) {
                fprintf(stderr, "latency: clock_gettime: %m\n");


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to