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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Wed Jul  2 19:02:36 2014 +0200

copperplate/threadobj: fix periodic mode setup

---

 lib/copperplate/threadobj.c |   21 +++------------------
 1 file changed, 3 insertions(+), 18 deletions(-)

diff --git a/lib/copperplate/threadobj.c b/lib/copperplate/threadobj.c
index 881b3ce..33f2d9f 100644
--- a/lib/copperplate/threadobj.c
+++ b/lib/copperplate/threadobj.c
@@ -1436,25 +1436,10 @@ int threadobj_set_periodic(struct threadobj *thobj,
                        return __bt(-errno);
        }
 
-       if (period == NULL) {
-               /* Maybe a oneshot specification. */
-               its.it_interval.tv_sec = 0;
-               its.it_interval.tv_nsec = 0;
-       } else
-               its.it_interval = *period;
-
-       if (idate == NULL) {
-               /* Maybe a start now or stop specification. */
-               its.it_value.tv_sec = 0;
-               its.it_value.tv_nsec = 0;
-               ret = __RT(timer_settime(thobj->periodic_timer, 0,
-                                        &its, NULL));
-       } else {
-               its.it_value = *idate;
-               ret = __RT(timer_settime(thobj->periodic_timer, TIMER_ABSTIME,
-                                        &its, NULL));
-       }
+       its.it_value = *idate;
+       its.it_interval = *period;
 
+       ret = __RT(timer_settime(thobj->periodic_timer, TIMER_ABSTIME, &its, 
NULL));
        if (ret)
                return __bt(-errno);
 


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

Reply via email to