Module: xenomai-gch
Branch: for-head
Commit: 02c0512ff3a129a5242e7d52378fe0a4d6449b8e
URL:    
http://git.xenomai.org/?p=xenomai-gch.git;a=commit;h=02c0512ff3a129a5242e7d52378fe0a4d6449b8e

Author: Philippe Gerum <r...@xenomai.org>
Date:   Sun Oct 25 11:34:54 2009 +0100

blackfin: initialize active task pointer for CONFIG_MPU

---

 include/asm-blackfin/bits/pod.h    |    3 +++
 include/asm-blackfin/bits/sched.h  |    3 +++
 include/asm-blackfin/bits/shadow.h |    3 +++
 include/asm-blackfin/bits/thread.h |    3 +++
 4 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/include/asm-blackfin/bits/pod.h b/include/asm-blackfin/bits/pod.h
index a77ac7e..9feda93 100644
--- a/include/asm-blackfin/bits/pod.h
+++ b/include/asm-blackfin/bits/pod.h
@@ -52,6 +52,9 @@ static inline void xnarch_leave_root(xnarchtcb_t * rootcb)
 {
        /* Remember the preempted Linux task pointer. */
        rootcb->user_task = current;
+#ifdef CONFIG_MPU
+       rootcb->active_task = current;
+#endif
        rootcb->tsp = &current->thread;
 }
 
diff --git a/include/asm-blackfin/bits/sched.h 
b/include/asm-blackfin/bits/sched.h
index a3c60f0..33e2685 100644
--- a/include/asm-blackfin/bits/sched.h
+++ b/include/asm-blackfin/bits/sched.h
@@ -25,6 +25,9 @@ static inline void xnarch_init_root_tcb(xnarchtcb_t * tcb,
                                        const char *name)
 {
        tcb->user_task = current;
+#ifdef CONFIG_MPU
+       tcb->active_task = NULL;
+#endif
        tcb->tsp = &tcb->ts;
        tcb->entry = NULL;
        tcb->cookie = NULL;
diff --git a/include/asm-blackfin/bits/shadow.h 
b/include/asm-blackfin/bits/shadow.h
index 2327067..f44d25d 100644
--- a/include/asm-blackfin/bits/shadow.h
+++ b/include/asm-blackfin/bits/shadow.h
@@ -31,6 +31,9 @@ static inline void xnarch_init_shadow_tcb(xnarchtcb_t * tcb,
        struct task_struct *task = current;
 
        tcb->user_task = task;
+#ifdef CONFIG_MPU
+       tcb->active_task = NULL;
+#endif
        tcb->tsp = &task->thread;
        tcb->entry = NULL;
        tcb->cookie = NULL;
diff --git a/include/asm-blackfin/bits/thread.h 
b/include/asm-blackfin/bits/thread.h
index c2e2a5e..eb0dfc0 100644
--- a/include/asm-blackfin/bits/thread.h
+++ b/include/asm-blackfin/bits/thread.h
@@ -28,6 +28,9 @@ static inline void xnarch_init_tcb(xnarchtcb_t * tcb)
 {
 
        tcb->user_task = NULL;
+#ifdef CONFIG_MPU
+       tcb->active_task = NULL;
+#endif
        tcb->tsp = &tcb->ts;
        /* Must be followed by xnarch_init_thread(). */
 }


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

Reply via email to