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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Tue Sep 23 11:47:33 2014 +0200

copperplate/threadobj: report overruns in threadobj_wait_period()

---

 lib/copperplate/threadobj.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/copperplate/threadobj.c b/lib/copperplate/threadobj.c
index 923bf83..32fbf01 100644
--- a/lib/copperplate/threadobj.c
+++ b/lib/copperplate/threadobj.c
@@ -1467,8 +1467,11 @@ int threadobj_wait_period(unsigned long *overruns_r)
                panic("cannot wait for next period, %s", symerror(-errno));
        }
 
-       if (overruns_r)
-               *overruns_r = si.si_overrun;
+       if (si.si_overrun) {
+               if (overruns_r)
+                       *overruns_r = si.si_overrun;
+               return -ETIMEDOUT;
+       }
 
        return 0;
 }


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

Reply via email to