Module: xenomai-2.6
Branch: master
Commit: f09505097e8358eeb8365c27e2ee3904e023ca18
URL:    
http://git.xenomai.org/?p=xenomai-2.6.git;a=commit;h=f09505097e8358eeb8365c27e2ee3904e023ca18

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Tue Dec 27 00:16:56 2011 +0100

tests: global exit using exit() instead of rt_task_delete()

---

 src/testsuite/latency/latency.c  |    2 +-
 src/testsuite/unit/wakeup-time.c |    4 ++--
 src/utils/can/rtcanrecv.c        |    4 ++--
 src/utils/can/rtcansend.c        |    2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/testsuite/latency/latency.c b/src/testsuite/latency/latency.c
index 9f6fa7f..1762a16 100644
--- a/src/testsuite/latency/latency.c
+++ b/src/testsuite/latency/latency.c
@@ -138,7 +138,7 @@ void latency(void *cookie)
                                        fprintf(stderr,
                                                "latency: wait period failed, 
code %d\n",
                                                err);
-                                       rt_task_delete(NULL);   /* Timer 
stopped. */
+                                       exit(EXIT_FAILURE); /* Timer stopped. */
                                }
 
                                overrun += ov;
diff --git a/src/testsuite/unit/wakeup-time.c b/src/testsuite/unit/wakeup-time.c
index 7e9eb6f..5ed3cb0 100644
--- a/src/testsuite/unit/wakeup-time.c
+++ b/src/testsuite/unit/wakeup-time.c
@@ -97,7 +97,7 @@ void event(void *cookie)
               if (err) {
                       if (err != -ETIMEDOUT) {
                               /* Timer stopped. */
-                              rt_task_delete(NULL);
+                              exit(EXIT_FAILURE);
                       }
               }
 
@@ -127,7 +127,7 @@ void worker(void *cookie)
                       if (err != -EIDRM)
                               fprintf(stderr,"switch: failed to pend on 
semaphore, code %d\n", err);
 
-                      rt_task_delete(NULL);
+                      exit(EXIT_FAILURE);
               }
 
               if (++count != switch_count) {
diff --git a/src/utils/can/rtcanrecv.c b/src/utils/can/rtcanrecv.c
index d8f2258..f3178c5 100644
--- a/src/utils/can/rtcanrecv.c
+++ b/src/utils/can/rtcanrecv.c
@@ -67,9 +67,9 @@ void cleanup(void)
        if (ret) {
            fprintf(stderr, "rt_dev_close: %s\n", strerror(-ret));
        }
-       rt_task_delete(&rt_task_desc);
-    }
+       exit(EXIT_SUCCESS);
     }
+}
 
 void cleanup_and_exit(int sig)
 {
diff --git a/src/utils/can/rtcansend.c b/src/utils/can/rtcansend.c
index 7ae3a38..d178305 100644
--- a/src/utils/can/rtcansend.c
+++ b/src/utils/can/rtcansend.c
@@ -62,7 +62,7 @@ void cleanup(void)
        if (ret) {
            fprintf(stderr, "rt_dev_close: %s\n", strerror(-ret));
        }
-       rt_task_delete(&rt_task_desc);
+       exit(EXIT_SUCCESS);
     }
 }
 


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to