mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
The system call library can now be built with CONFIG_NUTTX_KERNEL. New select: CONFIG_LIB_SYSCALL
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* arch/arm/src/armv6-m/svcall.h
|
* 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>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#ifdef CONFIG_NUTTX_KERNEL
|
#ifdef CONFIG_LIB_SYSCALL
|
||||||
# include <syscall.h>
|
# include <syscall.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -55,11 +55,19 @@
|
|||||||
* syscall return. The first four syscall values must be reserved.
|
* syscall return. The first four syscall values must be reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_NUTTX_KERNEL
|
#ifdef CONFIG_LIB_SYSCALL
|
||||||
# ifndef CONFIG_SYS_RESERVED
|
# ifdef CONFIG_NUTTX_KERNEL
|
||||||
# error "CONFIG_SYS_RESERVED must be defined to have the value 8"
|
# ifndef CONFIG_SYS_RESERVED
|
||||||
# elif CONFIG_SYS_RESERVED != 8
|
# error "CONFIG_SYS_RESERVED must be defined to have the value 8"
|
||||||
# error "CONFIG_SYS_RESERVED must 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
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/armv6-m/up_svcall.c
|
* 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>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
#include <arch/irq.h>
|
#include <arch/irq.h>
|
||||||
#include <nuttx/sched.h>
|
#include <nuttx/sched.h>
|
||||||
|
|
||||||
#ifdef CONFIG_NUTTX_KERNEL
|
#ifdef CONFIG_LIB_SYSCALL
|
||||||
# include <syscall.h>
|
# include <syscall.h>
|
||||||
#endif
|
#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) naked_function;
|
||||||
static void dispatch_syscall(void)
|
static void dispatch_syscall(void)
|
||||||
{
|
{
|
||||||
@@ -444,7 +444,7 @@ int up_svcall(int irq, FAR void *context)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_NUTTX_KERNEL
|
#ifdef CONFIG_LIB_SYSCALL
|
||||||
FAR struct tcb_s *rtcb = sched_self();
|
FAR struct tcb_s *rtcb = sched_self();
|
||||||
int index = rtcb->xcp.nsyscalls;
|
int index = rtcb->xcp.nsyscalls;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* arch/arm/src/armv7-m/svcall.h
|
* 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>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
#ifdef CONFIG_NUTTX_KERNEL
|
#ifdef CONFIG_LIB_SYSCALL
|
||||||
# include <syscall.h>
|
# include <syscall.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -55,11 +55,19 @@
|
|||||||
* syscall return. The first four syscall values must be reserved.
|
* syscall return. The first four syscall values must be reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef CONFIG_NUTTX_KERNEL
|
#ifdef CONFIG_LIB_SYSCALL
|
||||||
# ifndef CONFIG_SYS_RESERVED
|
# ifdef CONFIG_NUTTX_KERNEL
|
||||||
# error "CONFIG_SYS_RESERVED must be defined to have the value 8"
|
# ifndef CONFIG_SYS_RESERVED
|
||||||
# elif CONFIG_SYS_RESERVED != 8
|
# error "CONFIG_SYS_RESERVED must be defined to have the value 8"
|
||||||
# error "CONFIG_SYS_RESERVED must 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
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/armv7-m/up_svcall.c
|
* 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>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
#include <arch/irq.h>
|
#include <arch/irq.h>
|
||||||
#include <nuttx/sched.h>
|
#include <nuttx/sched.h>
|
||||||
|
|
||||||
#ifdef CONFIG_NUTTX_KERNEL
|
#ifdef CONFIG_LIB_SYSCALL
|
||||||
# include <syscall.h>
|
# include <syscall.h>
|
||||||
#endif
|
#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) naked_function;
|
||||||
static void dispatch_syscall(void)
|
static void dispatch_syscall(void)
|
||||||
{
|
{
|
||||||
@@ -443,7 +443,7 @@ int up_svcall(int irq, FAR void *context)
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_NUTTX_KERNEL
|
#ifdef CONFIG_LIB_SYSCALL
|
||||||
FAR struct tcb_s *rtcb = sched_self();
|
FAR struct tcb_s *rtcb = sched_self();
|
||||||
int index = rtcb->xcp.nsyscalls;
|
int index = rtcb->xcp.nsyscalls;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user