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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Tue Feb 17 11:42:38 2015 +0100

cobalt/kernel: unify naming of extern data - cobalt_cpu_affinity

---

 include/cobalt/kernel/sched.h |    2 +-
 kernel/cobalt/init.c          |    2 +-
 kernel/cobalt/intr.c          |    2 +-
 kernel/cobalt/posix/process.c |    2 +-
 kernel/cobalt/sched.c         |    8 ++++----
 kernel/cobalt/thread.c        |    6 +++---
 6 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/include/cobalt/kernel/sched.h b/include/cobalt/kernel/sched.h
index 04bd6ea..b7a4365 100644
--- a/include/cobalt/kernel/sched.h
+++ b/include/cobalt/kernel/sched.h
@@ -117,7 +117,7 @@ struct xnsched {
 
 DECLARE_PER_CPU(struct xnsched, nksched);
 
-extern cpumask_t nkaffinity;
+extern cpumask_t cobalt_cpu_affinity;
 
 extern struct list_head nkthreadq;
 
diff --git a/kernel/cobalt/init.c b/kernel/cobalt/init.c
index a060025..d5fc750 100644
--- a/kernel/cobalt/init.c
+++ b/kernel/cobalt/init.c
@@ -342,7 +342,7 @@ static int __init xenomai_init(void)
                set_realtime_core_state(COBALT_STATE_DISABLED);
                return 0;
        }
-       nkaffinity = xnsched_realtime_cpus;
+       cobalt_cpu_affinity = xnsched_realtime_cpus;
 #endif /* CONFIG_SMP */
 
        xnsched_register_classes();
diff --git a/kernel/cobalt/intr.c b/kernel/cobalt/intr.c
index fb29dab..dc66700 100644
--- a/kernel/cobalt/intr.c
+++ b/kernel/cobalt/intr.c
@@ -819,7 +819,7 @@ int xnintr_attach(struct xnintr *intr, void *cookie)
        clear_irqstats(intr);
 
 #ifdef CONFIG_SMP
-       ipipe_set_irq_affinity(intr->irq, nkaffinity);
+       ipipe_set_irq_affinity(intr->irq, cobalt_cpu_affinity);
 #endif /* CONFIG_SMP */
 
        raw_spin_lock(&intr->lock);
diff --git a/kernel/cobalt/posix/process.c b/kernel/cobalt/posix/process.c
index d53e34a..07b011f 100644
--- a/kernel/cobalt/posix/process.c
+++ b/kernel/cobalt/posix/process.c
@@ -808,7 +808,7 @@ static int handle_setaffinity_event(struct 
ipipe_cpu_migration_data *d)
         * affinity mask accordingly.
         */
        xnlock_get_irqsave(&nklock, s);
-       cpus_and(thread->affinity, p->cpus_allowed, nkaffinity);
+       cpus_and(thread->affinity, p->cpus_allowed, cobalt_cpu_affinity);
        xnthread_run_handler_stack(thread, move_thread, d->dest_cpu);
        xnlock_put_irqrestore(&nklock, s);
 
diff --git a/kernel/cobalt/sched.c b/kernel/cobalt/sched.c
index ecdd3ca..5f048c4 100644
--- a/kernel/cobalt/sched.c
+++ b/kernel/cobalt/sched.c
@@ -38,8 +38,8 @@
 DEFINE_PER_CPU(struct xnsched, nksched);
 EXPORT_PER_CPU_SYMBOL_GPL(nksched);
 
-cpumask_t nkaffinity = CPU_MASK_ALL;
-EXPORT_SYMBOL_GPL(nkaffinity);
+cpumask_t cobalt_cpu_affinity = CPU_MASK_ALL;
+EXPORT_SYMBOL_GPL(cobalt_cpu_affinity);
 
 LIST_HEAD(nkthreadq);
 
@@ -1281,7 +1281,7 @@ static int affinity_vfile_show(struct 
xnvfile_regular_iterator *it,
        int cpu;
 
        for (cpu = 0; cpu < BITS_PER_LONG; cpu++)
-               if (cpu_isset(cpu, nkaffinity))
+               if (cpu_isset(cpu, cobalt_cpu_affinity))
                        val |= (1UL << cpu);
 
        xnvfile_printf(it, "%08lx\n", val);
@@ -1324,7 +1324,7 @@ static ssize_t affinity_vfile_store(struct xnvfile_input 
*input)
                return -EINVAL;
 
        xnlock_get_irqsave(&nklock, s);
-       nkaffinity = affinity;
+       cobalt_cpu_affinity = affinity;
        xnlock_put_irqrestore(&nklock, s);
 
        return ret;
diff --git a/kernel/cobalt/thread.c b/kernel/cobalt/thread.c
index 4018d7c..b883c4a 100644
--- a/kernel/cobalt/thread.c
+++ b/kernel/cobalt/thread.c
@@ -168,7 +168,7 @@ int __xnthread_init(struct xnthread *thread,
                         sizeof(thread->name), "@%p", thread);
 
        thread->personality = attr->personality;
-       cpus_and(thread->affinity, attr->affinity, nkaffinity);
+       cpus_and(thread->affinity, attr->affinity, cobalt_cpu_affinity);
        thread->sched = sched;
        thread->state = flags;
        thread->info = 0;
@@ -559,7 +559,7 @@ void __xnthread_discard(struct xnthread *thread)
  *
  * - affinity: The processor affinity of this thread. Passing
  * CPU_MASK_ALL means "any cpu" from the allowed core affinity mask
- * (nkaffinity). Passing an empty set is invalid.
+ * (cobalt_cpu_affinity). Passing an empty set is invalid.
  *
  * @param sched_class The initial scheduling class the new thread
  * should be assigned to.
@@ -594,7 +594,7 @@ int xnthread_init(struct xnthread *thread,
         * affinity mask, and therefore also part of the supported
         * CPUs. This CPU may change in pin_to_initial_cpu().
         */
-       cpus_and(affinity, attr->affinity, nkaffinity);
+       cpus_and(affinity, attr->affinity, cobalt_cpu_affinity);
        if (cpus_empty(affinity))
                return -EINVAL;
 


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

Reply via email to