Module: xenomai-3
Branch: next
Commit: 00a68ec28ee25cd3a6fc9e1f1f3e4af7bab4635b
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=00a68ec28ee25cd3a6fc9e1f1f3e4af7bab4635b

Author: Philippe Gerum <r...@xenomai.org>
Date:   Tue Feb  9 11:50:20 2016 +0100

copperplate/threadobj: fix status returned by threadobj_sleep()

---

 lib/copperplate/threadobj.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/copperplate/threadobj.c b/lib/copperplate/threadobj.c
index 2d37d46..e0b2c9f 100644
--- a/lib/copperplate/threadobj.c
+++ b/lib/copperplate/threadobj.c
@@ -1600,7 +1600,7 @@ int threadobj_sleep(const struct timespec *ts)
                 */
                if (ts->tv_sec == 0 && ts->tv_nsec == 0) {
                        sigemptyset(&set);
-                       ret = __RT(sigwaitinfo(&set, NULL)) ? -errno : 0;
+                       ret = __RT(sigwaitinfo(&set, NULL)) ? errno : 0;
                } else
                        ret = __RT(clock_nanosleep(CLOCK_COPPERPLATE,
                                                   TIMER_ABSTIME, ts, NULL));


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

Reply via email to