Module: xenomai-jki
Branch: for-upstream
Commit: 248c0d3f5a8c17aa6d2dc299c5a43d0668012653
URL:    
http://git.xenomai.org/?p=xenomai-jki.git;a=commit;h=248c0d3f5a8c17aa6d2dc299c5a43d0668012653

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Thu Nov  4 16:54:27 2010 +0100

nucleus: Make all xnsched::status manipulation non-atomic

The status field is only manipulated locally with IRQs disabled, no need
for atomic ops.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 include/nucleus/sched.h |    4 ++--
 ksrc/nucleus/pod.c      |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/nucleus/sched.h b/include/nucleus/sched.h
index e3a22c7..548f0f1 100644
--- a/include/nucleus/sched.h
+++ b/include/nucleus/sched.h
@@ -173,14 +173,14 @@ static inline int xnsched_resched_p(struct xnsched *sched)
 /* Set self resched flag for the given scheduler. */
 #define xnsched_set_self_resched(__sched__) do {               \
   xnarch_cpu_set(xnsched_cpu(__sched__), (__sched__)->resched); \
-  setbits((__sched__)->status, XNRESCHED);                     \
+  __setbits((__sched__)->status, XNRESCHED);                   \
 } while (0)
 
 /* Set specific resched flag into the local scheduler mask. */
 #define xnsched_set_resched(__sched__) do {                            \
   xnsched_t *current_sched = xnpod_current_sched();                    \
   xnarch_cpu_set(xnsched_cpu(__sched__), current_sched->resched);      \
-  setbits(current_sched->status, XNRESCHED);                           \
+  __setbits(current_sched->status, XNRESCHED);                         \
 } while (0)
 
 void xnsched_zombie_hooks(struct xnthread *thread);
diff --git a/ksrc/nucleus/pod.c b/ksrc/nucleus/pod.c
index 0efc9c2..afb60b4 100644
--- a/ksrc/nucleus/pod.c
+++ b/ksrc/nucleus/pod.c
@@ -281,7 +281,7 @@ void xnpod_schedule_handler(void) /* Called with hw 
interrupts off. */
        trace_mark(xn_nucleus, sched_remote, MARK_NOARGS);
 #if defined(CONFIG_SMP) && defined(CONFIG_XENO_OPT_PRIOCPL)
        if (testbits(sched->status, XNRPICK)) {
-               clrbits(sched->status, XNRPICK);
+               __clrbits(sched->status, XNRPICK);
                xnshadow_rpi_check();
        }
 #endif /* CONFIG_SMP && CONFIG_XENO_OPT_PRIOCPL */
@@ -2180,7 +2180,7 @@ static inline int __xnpod_test_resched(struct xnsched 
*sched)
                xnarch_cpus_clear(sched->resched);
        }
 #endif
-       clrbits(sched->status, XNRESCHED);
+       __clrbits(sched->status, XNRESCHED);
        return resched;
 }
 


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

Reply via email to