Module: xenomai-forge
Branch: master
Commit: 32664f7f1c30e7f23286307051ec45ed6c6af72f
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=32664f7f1c30e7f23286307051ec45ed6c6af72f

Author: Philippe Gerum <r...@xenomai.org>
Date:   Thu Dec 19 15:55:58 2013 +0100

lib/cobalt: enable SCHED_QUOTA policy

---

 include/cobalt/sched.h |    2 ++
 lib/cobalt/thread.c    |    3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/cobalt/sched.h b/include/cobalt/sched.h
index fd53161..ece501c 100644
--- a/include/cobalt/sched.h
+++ b/include/cobalt/sched.h
@@ -44,6 +44,8 @@ void __sched_cpufill(size_t __setsize, cpu_set_t *__setp);
 #define sched_tp_confsz(nr_win) \
   (sizeof(struct __sched_config_tp) + nr_win * sizeof(struct sched_tp_window))
 
+#define sched_quota_confsz()  sizeof(struct __sched_config_quota)
+
 #ifdef __cplusplus
 extern "C" {
 #endif
diff --git a/lib/cobalt/thread.c b/lib/cobalt/thread.c
index 89c1d46..bf3c22b 100644
--- a/lib/cobalt/thread.c
+++ b/lib/cobalt/thread.c
@@ -30,7 +30,7 @@
 #include "internal.h"
 #include <boilerplate/ancillaries.h>
 
-static pthread_attr_ex_t default_attr_ex;
+static pthread_attr_ex_t default_attr_ex; /* We want it zeroed at init. */
 
 static int linuxthreads;
 
@@ -59,6 +59,7 @@ static int libc_setschedparam(pthread_t thread,
        case SCHED_COBALT:
        case SCHED_TP:
        case SCHED_SPORADIC:
+       case SCHED_QUOTA:
                policy = SCHED_FIFO;
                /*
                 * Our priority range is larger than the regular


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

Reply via email to