From 3bb8926f0007cac7f1669faa489e7bcd39813c38 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 5 Oct 2014 16:58:52 -0600 Subject: [PATCH] Fix some recently introduced typos, build problems, and warnings --- arch/arm/src/common/up_vfork.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm/src/common/up_vfork.c b/arch/arm/src/common/up_vfork.c index a11c3b94f4..801ac1f675 100644 --- a/arch/arm/src/common/up_vfork.c +++ b/arch/arm/src/common/up_vfork.c @@ -239,8 +239,23 @@ pid_t up_vfork(const struct vfork_s *context) { child->cmn.xcp.syscall[index].sysreturn = parent->xcp.syscall[index].sysreturn; + + /* REVISIT: This logic is *not* common. */ + +#if (defined(CONFIG_ARCH_CORTEXA5) || defined(CONFIG_ARCH_CORTEXA8)) && \ + defined(CONFIG_BUILD_KERNEL) + + child->cmn.xcp.syscall[index].cpsr = + parent->xcp.syscall[index].cpsr; + +#elif defined(CONFIG_ARCH_CORTEXM3) || defined(CONFIG_ARCH_CORTEXM4) || \ + defined(CONFIG_ARCH_CORTEXM0) + child->cmn.xcp.syscall[index].excreturn = parent->xcp.syscall[index].excreturn; +#else +# error Missing logic +#endif } child->cmn.xcp.nsyscalls = parent->xcp.nsyscalls;