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

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Sat Jun 18 15:24:22 2011 +0200

nucleus: clarify comments

Since f6af9b831c, the xnpod_schedule of an interrupt handler may also
perform a domain migration. For that case, we must iensure that
interrupts are disabled before returning to a migrated shadow context
as the interrupt handler tail depends on that. Make this clear in comments

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

---

 ksrc/nucleus/pod.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/ksrc/nucleus/pod.c b/ksrc/nucleus/pod.c
index ec24cb3..a98d9b7 100644
--- a/ksrc/nucleus/pod.c
+++ b/ksrc/nucleus/pod.c
@@ -1473,8 +1473,7 @@ void xnpod_suspend_thread(xnthread_t *thread, xnflags_t 
mask,
                 * would enter the critical section in xnpod_schedule
                 * while the current Adeos domain is Linux, which
                 * would defeat the purpose of having called
-                * xnarch_escalate(). xnpod_schedule() is expected to
-                * return with interrupts on.
+                * xnarch_escalate().
                 */
                if (mask & XNRELAX) {
                        xnlock_clear_irqon(&nklock);
@@ -2345,9 +2344,10 @@ reschedule:
                        xnshadow_exit();
                }
 
-               /* We are returning to xnshadow_relax via
-                  xnpod_suspend_thread, do nothing,
-                  xnpod_suspend_thread will re-enable interrupts. */
+               /* Interrupts are disabled here, but it is what
+                  callers expect, specifically the reschedule of an
+                  IRQ handler that hit before we call xnpod_schedule in
+                  xnpod_suspend_thread when relaxing a thread. */
                return;
        }
 #endif /* CONFIG_XENO_OPT_PERVASIVE */


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

Reply via email to