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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sun Oct 26 17:57:46 2014 +0100

cobalt/posix/thread: propagate error upon failed setschedparam

---

 kernel/cobalt/posix/thread.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/cobalt/posix/thread.c b/kernel/cobalt/posix/thread.c
index defea50..27c824b 100644
--- a/kernel/cobalt/posix/thread.c
+++ b/kernel/cobalt/posix/thread.c
@@ -246,7 +246,7 @@ pthread_setschedparam_ex(struct cobalt_thread *thread,
        struct xnsched_class *sched_class;
        union xnsched_policy_param param;
        xnticks_t tslice;
-       int ret = 0;
+       int ret;
        spl_t s;
 
        xnlock_get_irqsave(&nklock, s);
@@ -269,7 +269,8 @@ pthread_setschedparam_ex(struct cobalt_thread *thread,
        if (cobalt_call_extension(thread_setsched, &thread->extref, ret,
                                  sched_class, &param) && ret)
                goto out;
-       xnthread_set_schedparam(&thread->threadbase, sched_class, &param);
+       ret = xnthread_set_schedparam(&thread->threadbase,
+                                     sched_class, &param);
        xnsched_run();
 out:
        xnlock_put_irqrestore(&nklock, s);


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

Reply via email to