The system call library can now be built with CONFIG_NUTTX_KERNEL. New select: CONFIG_LIB_SYSCALL

This commit is contained in:
Gregory Nutt
2014-08-28 12:09:49 -06:00
parent 4fa5b52e43
commit 3561aac62a
4 changed files with 38 additions and 22 deletions
+15 -7
View File
@@ -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
+4 -4
View File
@@ -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;
+15 -7
View File
@@ -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
+4 -4
View File
@@ -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;