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

Author: Philippe Gerum <r...@xenomai.org>
Date:   Fri Sep  9 16:07:54 2016 +0200

cobalt/arm: thread: move all TCB initializers out of line

Does not impact performances and fixes inclusion hell for pulling the
struct xnthread definition for good.

---

 kernel/cobalt/arch/arm/include/asm/xenomai/thread.h |    6 +-----
 kernel/cobalt/arch/arm/thread.c                     |    7 +++++++
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/kernel/cobalt/arch/arm/include/asm/xenomai/thread.h 
b/kernel/cobalt/arch/arm/include/asm/xenomai/thread.h
index bfe0b9c..3ab9732 100644
--- a/kernel/cobalt/arch/arm/include/asm/xenomai/thread.h
+++ b/kernel/cobalt/arch/arm/include/asm/xenomai/thread.h
@@ -77,11 +77,7 @@ static inline int xnarch_escalate(void)
 
 #if defined(CONFIG_XENO_ARCH_FPU) && defined(CONFIG_VFP)
 
-static inline void xnarch_init_root_tcb(struct xnthread *thread)
-{
-       struct xnarchtcb *tcb = xnthread_archtcb(thread);
-       tcb->fpup = NULL;
-}
+void xnarch_init_root_tcb(struct xnthread *thread);
 
 void xnarch_init_shadow_tcb(struct xnthread *thread);
 
diff --git a/kernel/cobalt/arch/arm/thread.c b/kernel/cobalt/arch/arm/thread.c
index 5224218..d3c2fed 100644
--- a/kernel/cobalt/arch/arm/thread.c
+++ b/kernel/cobalt/arch/arm/thread.c
@@ -304,6 +304,13 @@ void xnarch_init_shadow_tcb(struct xnthread *thread)
        /* XNFPU is set upon first FPU fault */
        xnthread_clear_state(thread, XNFPU);
 }
+
+void xnarch_init_root_tcb(struct xnthread *thread)
+{
+       struct xnarchtcb *tcb = &thread->tcb;
+       tcb->fpup = NULL;
+}
+
 #endif /* CONFIG_XENO_ARCH_FPU && CONFIG_VFP*/
 
 void xnarch_switch_to(struct xnthread *out, struct xnthread *in)


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

Reply via email to