From 35330f6c7500f521280ec5c864d65164bbbc2ea5 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 5 Oct 2014 16:58:52 -0600 Subject: Fix some recently introduced typos, build problems, and warnings --- nuttx/arch/arm/src/common/up_vfork.c | 15 +++++++++++++++ nuttx/include/sys/syscall.h | 12 ++++++------ nuttx/sched/task/task_vfork.c | 3 ++- nuttx/syscall/syscall_stublookup.c | 4 ++-- 4 files changed, 25 insertions(+), 9 deletions(-) (limited to 'nuttx') diff --git a/nuttx/arch/arm/src/common/up_vfork.c b/nuttx/arch/arm/src/common/up_vfork.c index a11c3b94f..801ac1f67 100644 --- a/nuttx/arch/arm/src/common/up_vfork.c +++ b/nuttx/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; diff --git a/nuttx/include/sys/syscall.h b/nuttx/include/sys/syscall.h index 34b06b986..755162a74 100644 --- a/nuttx/include/sys/syscall.h +++ b/nuttx/include/sys/syscall.h @@ -235,13 +235,13 @@ # define SYS_pread (__SYS_descriptors+4) # define SYS_pwrite (__SYS_descriptors+5) # ifdef CONFIG_FS_AIO -# define SYS_aio_read (_SYS_descriptors+6) -# define SYS_aio_write (_SYS_descriptors+7) -# define SYS_aio_fsync (_SYS_descriptors+8) -# define SYS_aio_cancel (_SYS_descriptors+9) -# define __SYS_poll (_SYS_descriptors+10) +# define SYS_aio_read (__SYS_descriptors+6) +# define SYS_aio_write (__SYS_descriptors+7) +# define SYS_aio_fsync (__SYS_descriptors+8) +# define SYS_aio_cancel (__SYS_descriptors+9) +# define __SYS_poll (__SYS_descriptors+10) # else -# define __SYS_poll (_SYS_descriptors+6) +# define __SYS_poll (__SYS_descriptors+6) # endif # ifndef CONFIG_DISABLE_POLL # define SYS_poll __SYS_poll diff --git a/nuttx/sched/task/task_vfork.c b/nuttx/sched/task/task_vfork.c index ea7ce295b..379edf2cf 100644 --- a/nuttx/sched/task/task_vfork.c +++ b/nuttx/sched/task/task_vfork.c @@ -41,9 +41,10 @@ #include #include +#include #include -#include #include +#include #include #include diff --git a/nuttx/syscall/syscall_stublookup.c b/nuttx/syscall/syscall_stublookup.c index eb1e78629..d0805ee66 100644 --- a/nuttx/syscall/syscall_stublookup.c +++ b/nuttx/syscall/syscall_stublookup.c @@ -175,8 +175,8 @@ uintptr_t STUB_select(int nbr, uintptr_t parm1, uintptr_t parm2, uintptr_t STUB_aio_read(int nbr, uintptr_t parm1); uintptr_t STUB_aio_write(int nbr, uintptr_t parm1); -uintptr_t STUB_aio_fsync(int nbr, uintptr_t parm1, uintptr_t parm1); -uintptr_t STUB_aio_cancel(int nbr, uintptr_t parm1, uintptr_t parm1); +uintptr_t STUB_aio_fsync(int nbr, uintptr_t parm1, uintptr_t parm2); +uintptr_t STUB_aio_cancel(int nbr, uintptr_t parm1, uintptr_t parm2); /* The following are defined if file descriptors are enabled */ -- cgit v1.2.3