summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/arm/src')
-rw-r--r--nuttx/arch/arm/src/armv6-m/svcall.h22
-rw-r--r--nuttx/arch/arm/src/armv6-m/up_svcall.c8
-rw-r--r--nuttx/arch/arm/src/armv7-m/svcall.h22
-rw-r--r--nuttx/arch/arm/src/armv7-m/up_svcall.c8
4 files changed, 38 insertions, 22 deletions
diff --git a/nuttx/arch/arm/src/armv6-m/svcall.h b/nuttx/arch/arm/src/armv6-m/svcall.h
index daa70a0c0..f5511c525 100644
--- a/nuttx/arch/arm/src/armv6-m/svcall.h
+++ b/nuttx/arch/arm/src/armv6-m/svcall.h
@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/armv6-m/svcall.h
*
- * Copyright (C) 2013 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2013-2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -42,7 +42,7 @@
#include <nuttx/config.h>
-#ifdef CONFIG_NUTTX_KERNEL
+#ifdef CONFIG_LIB_SYSCALL
# include <syscall.h>
#endif
@@ -55,11 +55,19 @@
* syscall return. The first four syscall values must be reserved.
*/
-#ifdef CONFIG_NUTTX_KERNEL
-# ifndef CONFIG_SYS_RESERVED
-# error "CONFIG_SYS_RESERVED must be defined to have the value 8"
-# elif CONFIG_SYS_RESERVED != 8
-# error "CONFIG_SYS_RESERVED must have the value 8"
+#ifdef CONFIG_LIB_SYSCALL
+# ifdef CONFIG_NUTTX_KERNEL
+# ifndef CONFIG_SYS_RESERVED
+# error "CONFIG_SYS_RESERVED must be defined to have the value 8"
+# elif CONFIG_SYS_RESERVED != 8
+# error "CONFIG_SYS_RESERVED must have the value 8"
+# endif
+# else
+# ifndef CONFIG_SYS_RESERVED
+# error "CONFIG_SYS_RESERVED must be defined to have the value 3"
+# elif CONFIG_SYS_RESERVED != 3
+# error "CONFIG_SYS_RESERVED must have the value 3"
+# endif
# endif
#endif
diff --git a/nuttx/arch/arm/src/armv6-m/up_svcall.c b/nuttx/arch/arm/src/armv6-m/up_svcall.c
index 1b367259b..ad9da62d4 100644
--- a/nuttx/arch/arm/src/armv6-m/up_svcall.c
+++ b/nuttx/arch/arm/src/armv6-m/up_svcall.c
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/armv6-m/up_svcall.c
*
- * Copyright (C) 2013 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2013-2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -47,7 +47,7 @@
#include <arch/irq.h>
#include <nuttx/sched.h>
-#ifdef CONFIG_NUTTX_KERNEL
+#ifdef CONFIG_LIB_SYSCALL
# include <syscall.h>
#endif
@@ -119,7 +119,7 @@
*
****************************************************************************/
-#ifdef CONFIG_NUTTX_KERNEL
+#ifdef CONFIG_LIB_SYSCALL
static void dispatch_syscall(void) naked_function;
static void dispatch_syscall(void)
{
@@ -444,7 +444,7 @@ int up_svcall(int irq, FAR void *context)
default:
{
-#ifdef CONFIG_NUTTX_KERNEL
+#ifdef CONFIG_LIB_SYSCALL
FAR struct tcb_s *rtcb = sched_self();
int index = rtcb->xcp.nsyscalls;
diff --git a/nuttx/arch/arm/src/armv7-m/svcall.h b/nuttx/arch/arm/src/armv7-m/svcall.h
index 2c4735335..64c4bdfe8 100644
--- a/nuttx/arch/arm/src/armv7-m/svcall.h
+++ b/nuttx/arch/arm/src/armv7-m/svcall.h
@@ -1,7 +1,7 @@
/************************************************************************************
* arch/arm/src/armv7-m/svcall.h
*
- * Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2011, 2013-2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -42,7 +42,7 @@
#include <nuttx/config.h>
-#ifdef CONFIG_NUTTX_KERNEL
+#ifdef CONFIG_LIB_SYSCALL
# include <syscall.h>
#endif
@@ -55,11 +55,19 @@
* syscall return. The first four syscall values must be reserved.
*/
-#ifdef CONFIG_NUTTX_KERNEL
-# ifndef CONFIG_SYS_RESERVED
-# error "CONFIG_SYS_RESERVED must be defined to have the value 8"
-# elif CONFIG_SYS_RESERVED != 8
-# error "CONFIG_SYS_RESERVED must have the value 8"
+#ifdef CONFIG_LIB_SYSCALL
+# ifdef CONFIG_NUTTX_KERNEL
+# ifndef CONFIG_SYS_RESERVED
+# error "CONFIG_SYS_RESERVED must be defined to have the value 8"
+# elif CONFIG_SYS_RESERVED != 8
+# error "CONFIG_SYS_RESERVED must have the value 8"
+# endif
+# else
+# ifndef CONFIG_SYS_RESERVED
+# error "CONFIG_SYS_RESERVED must be defined to have the value 3"
+# elif CONFIG_SYS_RESERVED != 3
+# error "CONFIG_SYS_RESERVED must have the value 3"
+# endif
# endif
#endif
diff --git a/nuttx/arch/arm/src/armv7-m/up_svcall.c b/nuttx/arch/arm/src/armv7-m/up_svcall.c
index be33b675d..9909057d3 100644
--- a/nuttx/arch/arm/src/armv7-m/up_svcall.c
+++ b/nuttx/arch/arm/src/armv7-m/up_svcall.c
@@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/armv7-m/up_svcall.c
*
- * Copyright (C) 2009, 2011-2013 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2009, 2011-2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -47,7 +47,7 @@
#include <arch/irq.h>
#include <nuttx/sched.h>
-#ifdef CONFIG_NUTTX_KERNEL
+#ifdef CONFIG_LIB_SYSCALL
# include <syscall.h>
#endif
@@ -116,7 +116,7 @@
*
****************************************************************************/
-#ifdef CONFIG_NUTTX_KERNEL
+#ifdef CONFIG_LIB_SYSCALL
static void dispatch_syscall(void) naked_function;
static void dispatch_syscall(void)
{
@@ -443,7 +443,7 @@ int up_svcall(int irq, FAR void *context)
default:
{
-#ifdef CONFIG_NUTTX_KERNEL
+#ifdef CONFIG_LIB_SYSCALL
FAR struct tcb_s *rtcb = sched_self();
int index = rtcb->xcp.nsyscalls;