Module: xenomai-3 Branch: wip/drivers Commit: d1ff8ae209e91b5cef29e46e0c1f8d89b3053fe8 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=d1ff8ae209e91b5cef29e46e0c1f8d89b3053fe8
Author: Philippe Gerum <r...@xenomai.org> Date: Fri Sep 9 16:07:54 2016 +0200 cobalt/powerpc: 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/powerpc/include/asm/xenomai/thread.h | 12 ++---------- kernel/cobalt/arch/powerpc/thread.c | 12 ++++++++++++ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/kernel/cobalt/arch/powerpc/include/asm/xenomai/thread.h b/kernel/cobalt/arch/powerpc/include/asm/xenomai/thread.h index 1de5cac..0ab48be 100644 --- a/kernel/cobalt/arch/powerpc/include/asm/xenomai/thread.h +++ b/kernel/cobalt/arch/powerpc/include/asm/xenomai/thread.h @@ -52,17 +52,9 @@ static inline void xnarch_enter_root(struct xnthread *root) { } #ifdef CONFIG_XENO_ARCH_FPU -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); -static inline void xnarch_init_shadow_tcb(struct xnthread *thread) -{ - struct xnarchtcb *tcb = xnthread_archtcb(thread); - tcb->fpup = &tcb->core.host_task->thread; -} +void xnarch_init_shadow_tcb(struct xnthread *thread); void xnarch_leave_root(struct xnthread *root); diff --git a/kernel/cobalt/arch/powerpc/thread.c b/kernel/cobalt/arch/powerpc/thread.c index e3be67f..062d33d 100644 --- a/kernel/cobalt/arch/powerpc/thread.c +++ b/kernel/cobalt/arch/powerpc/thread.c @@ -159,4 +159,16 @@ void xnarch_leave_root(struct xnthread *root) &rootcb->core.user_fpu_owner->thread : NULL; } +void xnarch_init_root_tcb(struct xnthread *thread) +{ + struct xnarchtcb *tcb = &thread->tcb; + tcb->fpup = NULL; +} + +void xnarch_init_shadow_tcb(struct xnthread *thread) +{ + struct xnarchtcb *tcb = &thread->tcb; + tcb->fpup = &tcb->core.host_task->thread; +} + #endif /* CONFIG_XENO_ARCH_FPU */ _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git