diff --git a/arch/arm/src/armv6-m/svcall.h b/arch/arm/src/armv6-m/svcall.h index daa70a0c0ec..f5511c525d0 100644 --- a/arch/arm/src/armv6-m/svcall.h +++ b/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 * * Redistribution and use in source and binary forms, with or without @@ -42,7 +42,7 @@ #include -#ifdef CONFIG_NUTTX_KERNEL +#ifdef CONFIG_LIB_SYSCALL # include #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/arch/arm/src/armv6-m/up_svcall.c b/arch/arm/src/armv6-m/up_svcall.c index 1b367259bee..ad9da62d48e 100644 --- a/arch/arm/src/armv6-m/up_svcall.c +++ b/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 * * Redistribution and use in source and binary forms, with or without @@ -47,7 +47,7 @@ #include #include -#ifdef CONFIG_NUTTX_KERNEL +#ifdef CONFIG_LIB_SYSCALL # include #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/arch/arm/src/armv7-m/svcall.h b/arch/arm/src/armv7-m/svcall.h index 2c47353350f..64c4bdfe8d3 100644 --- a/arch/arm/src/armv7-m/svcall.h +++ b/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 * * Redistribution and use in source and binary forms, with or without @@ -42,7 +42,7 @@ #include -#ifdef CONFIG_NUTTX_KERNEL +#ifdef CONFIG_LIB_SYSCALL # include #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/arch/arm/src/armv7-m/up_svcall.c b/arch/arm/src/armv7-m/up_svcall.c index be33b675d98..9909057d3fb 100644 --- a/arch/arm/src/armv7-m/up_svcall.c +++ b/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 * * Redistribution and use in source and binary forms, with or without @@ -47,7 +47,7 @@ #include #include -#ifdef CONFIG_NUTTX_KERNEL +#ifdef CONFIG_LIB_SYSCALL # include #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;