Module: xenomai-gch
Branch: for-forge
Commit: 3dd40c9f8a9d6d7ba17113a337df69118f57c169
URL:    
http://git.xenomai.org/?p=xenomai-gch.git;a=commit;h=3dd40c9f8a9d6d7ba17113a337df69118f57c169

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Sun Jun  1 16:49:03 2014 +0200

cobalt/sched: fix compilation without SCHED_QUOTA

---

 kernel/cobalt/posix/sched.c |    6 +++++-
 kernel/cobalt/posix/sched.h |    2 ++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/kernel/cobalt/posix/sched.c b/kernel/cobalt/posix/sched.c
index a8588a1..603a36c 100644
--- a/kernel/cobalt/posix/sched.c
+++ b/kernel/cobalt/posix/sched.c
@@ -491,7 +491,7 @@ ssize_t get_quota_config(int cpu, union sched_config __user 
*u_config,
                         size_t len)
 {
        union sched_config buf;
-       
+
        if (__xn_safe_copy_from_user(&buf, (const void __user *)u_config, len))
                return -EFAULT;
 
@@ -718,7 +718,9 @@ int cobalt_sched_weighted_prio(int policy,
 void cobalt_sched_cleanup(struct cobalt_kqueues *q)
 {
        struct cobalt_sched_group *group;
+#ifdef CONFIG_XENO_OPT_SCHED_QUOTA
        int quota_sum;
+#endif
        spl_t s;
 
        xnlock_get_irqsave(&nklock, s);
@@ -728,7 +730,9 @@ void cobalt_sched_cleanup(struct cobalt_kqueues *q)
                        break;
 
                group = list_get_entry(&q->schedq, struct cobalt_sched_group, 
next);
+#ifdef CONFIG_XENO_OPT_SCHED_QUOTA
                xnsched_quota_destroy_group(&group->quota, &quota_sum);
+#endif
                xnlock_put_irqrestore(&nklock, s);
                xnfree(group);
                xnlock_get_irqsave(&nklock, s);
diff --git a/kernel/cobalt/posix/sched.h b/kernel/cobalt/posix/sched.h
index f8288b4..59ca971 100644
--- a/kernel/cobalt/posix/sched.h
+++ b/kernel/cobalt/posix/sched.h
@@ -24,7 +24,9 @@
 struct cobalt_kqueues;
 
 struct cobalt_sched_group {
+#ifdef CONFIG_XENO_OPT_SCHED_QUOTA
        struct xnsched_quota_group quota;
+#endif
        struct cobalt_kqueues *kq;
        int pshared;
        struct list_head next;


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

Reply via email to