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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sat Jul 27 12:28:27 2013 +0200

cobalt/posix: pthread_make_periodic_np: fix return code for bad clock_id

---

 kernel/cobalt/posix/thread.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/cobalt/posix/thread.c b/kernel/cobalt/posix/thread.c
index adff7f2..17ffad1 100644
--- a/kernel/cobalt/posix/thread.c
+++ b/kernel/cobalt/posix/thread.c
@@ -517,7 +517,7 @@ static inline int pthread_create(struct cobalt_thread 
**thread_p, const pthread_
  * @return an error number if:
  * - ESRCH, @a thread is invalid;
  * - ETIMEDOUT, the start time has already passed.
- * - EOPNOTSUPP, the specified clock is unsupported;
+ * - EINVAL, the specified clock is unsupported;
  *
  * Rescheduling: always, until the @a starttp start time has been reached.
  */
@@ -534,7 +534,7 @@ static inline int pthread_make_periodic_np(struct 
cobalt_thread *thread,
        if (clock_id != CLOCK_MONOTONIC &&
            clock_id != CLOCK_MONOTONIC_RAW &&
            clock_id != CLOCK_REALTIME)
-               return EOPNOTSUPP;
+               return -EINVAL;
 
        xnlock_get_irqsave(&nklock, s);
 


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

Reply via email to