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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sat Sep  3 11:20:21 2016 +0200

cobalt/kernel: stop using deprecated set_cpus_allowed()

---

 kernel/cobalt/thread.c              |    4 ++--
 kernel/drivers/testing/switchtest.c |   10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/kernel/cobalt/thread.c b/kernel/cobalt/thread.c
index 435cd4b..6c084f7 100644
--- a/kernel/cobalt/thread.c
+++ b/kernel/cobalt/thread.c
@@ -2254,7 +2254,7 @@ void xnthread_relax(int notify, int reason)
        if (xnthread_test_localinfo(thread, XNMOVED)) {
                xnthread_clear_localinfo(thread, XNMOVED);
                cpu = xnsched_cpu(thread->sched);
-               set_cpus_allowed(p, *cpumask_of(cpu));
+               set_cpus_allowed_ptr(p, cpumask_of(cpu));
        }
 #endif
 
@@ -2502,7 +2502,7 @@ void xnthread_pin_initial(struct xnthread *thread)
        if (!cpumask_test_cpu(cpu, &thread->affinity))
                cpu = cpumask_first(&thread->affinity);
 
-       set_cpus_allowed(p, *cpumask_of(cpu));
+       set_cpus_allowed_ptr(p, cpumask_of(cpu));
        /*
         * @thread is still unstarted Xenomai-wise, we are precisely
         * in the process of mapping the current kernel task to
diff --git a/kernel/drivers/testing/switchtest.c 
b/kernel/drivers/testing/switchtest.c
index 7283dd5..3a2e0d5 100644
--- a/kernel/drivers/testing/switchtest.c
+++ b/kernel/drivers/testing/switchtest.c
@@ -495,7 +495,7 @@ static int rtswitch_create_ktask(struct rtswitch_context 
*ctx,
        iattr.affinity = *cpumask_of(ctx->cpu);
        param.rt.prio = 1;
 
-       set_cpus_allowed(current, *cpumask_of(ctx->cpu));
+       set_cpus_allowed_ptr(current, cpumask_of(ctx->cpu));
 
        err = xnthread_init(&task->ktask,
                            &iattr, &xnsched_class_rt, &param);
@@ -512,9 +512,9 @@ static int rtswitch_create_ktask(struct rtswitch_context 
*ctx,
                task->base.flags = 0;
        /*
         * Putting the argument on stack is safe, because the new
-        * thread, thanks to the abovce call of set_cpus_allowed,
-        * will preempt the current thread immediately, and
-        * will suspend only once the arguments on stack are used.
+        * thread, thanks to the above call to set_cpus_allowed_ptr(),
+        * will preempt the current thread immediately, and will
+        * suspend only once the arguments on stack are used.
         */
 
        return err;
@@ -553,7 +553,7 @@ static void rtswitch_close(struct rtdm_fd *fd)
        rtdm_nrtsig_destroy(&ctx->wake_utask);
 
        if (ctx->tasks) {
-               set_cpus_allowed(current, *cpumask_of(ctx->cpu));
+               set_cpus_allowed_ptr(current, cpumask_of(ctx->cpu));
 
                for (i = 0; i < ctx->next_index; i++) {
                        struct rtswitch_task *task = &ctx->tasks[i];


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

Reply via email to