Module: xenomai-3
Branch: stable-3.0.x
Commit: eea3a818a16089bb508d8424249591368adee268
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=eea3a818a16089bb508d8424249591368adee268

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