syscall/ and related: Fix an error found in build testing. Inconsistent conditional compilation led to link errors in certain configurations.
This commit is contained in:
parent
ac151e05e7
commit
5f02b0335f
@ -135,7 +135,7 @@ extern "C"
|
|||||||
|
|
||||||
void add_file_action(FAR posix_spawn_file_actions_t *file_action,
|
void add_file_action(FAR posix_spawn_file_actions_t *file_action,
|
||||||
FAR struct spawn_general_file_action_s *entry);
|
FAR struct spawn_general_file_action_s *entry);
|
||||||
#ifdef CONFIG_LIB_SYSCALL
|
#ifdef CONFIG_BUILD_PROTECTED
|
||||||
int nx_task_spawn(FAR const struct spawn_syscall_parms_s *parms);
|
int nx_task_spawn(FAR const struct spawn_syscall_parms_s *parms);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -128,8 +128,12 @@
|
|||||||
|
|
||||||
#ifndef CONFIG_BUILD_KERNEL
|
#ifndef CONFIG_BUILD_KERNEL
|
||||||
# define SYS_task_create __SYS_task_create
|
# define SYS_task_create __SYS_task_create
|
||||||
|
#ifdef CONFIG_BUILD_PROTECTED
|
||||||
# define SYS_nx_task_spawn (__SYS_task_create + 1)
|
# define SYS_nx_task_spawn (__SYS_task_create + 1)
|
||||||
# define __SYS_task_delete (__SYS_task_create + 2)
|
# define __SYS_task_delete (__SYS_task_create + 2)
|
||||||
|
#else
|
||||||
|
# define __SYS_task_delete (__SYS_task_create + 1)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* pgalloc() is only available with address environments with the page
|
/* pgalloc() is only available with address environments with the page
|
||||||
* allocator selected. MMU support from the CPU is also required.
|
* allocator selected. MMU support from the CPU is also required.
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
#include <spawn.h>
|
#include <spawn.h>
|
||||||
#include <nuttx/spawn.h>
|
#include <nuttx/spawn.h>
|
||||||
|
|
||||||
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_LIB_SYSCALL)
|
#ifdef CONFIG_BUILD_PROTECTED
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
@ -91,4 +91,4 @@ int task_spawn(FAR pid_t *pid, FAR const char *name, main_t entry,
|
|||||||
return nx_task_spawn(&parms);
|
return nx_task_spawn(&parms);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_BUILD_PROTECTED && CONFIG_LIB_SYSCALL */
|
#endif /* CONFIG_BUILD_PROTECTED */
|
||||||
|
@ -458,7 +458,7 @@ errout_with_lock:
|
|||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#if defined(CONFIG_BUILD_PROTECTED) && defined(CONFIG_LIB_SYSCALL)
|
#ifdef CONFIG_BUILD_PROTECTED
|
||||||
int nx_task_spawn(FAR const struct spawn_syscall_parms_s *parms)
|
int nx_task_spawn(FAR const struct spawn_syscall_parms_s *parms)
|
||||||
{
|
{
|
||||||
DEBUGASSERT(parms != NULL);
|
DEBUGASSERT(parms != NULL);
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
"mq_timedreceive","mqueue.h","!defined(CONFIG_DISABLE_MQUEUE)","ssize_t","mqd_t","char*","size_t","FAR unsigned int*","const struct timespec*"
|
"mq_timedreceive","mqueue.h","!defined(CONFIG_DISABLE_MQUEUE)","ssize_t","mqd_t","char*","size_t","FAR unsigned int*","const struct timespec*"
|
||||||
"mq_timedsend","mqueue.h","!defined(CONFIG_DISABLE_MQUEUE)","int","mqd_t","const char*","size_t","unsigned int","const struct timespec*"
|
"mq_timedsend","mqueue.h","!defined(CONFIG_DISABLE_MQUEUE)","int","mqd_t","const char*","size_t","unsigned int","const struct timespec*"
|
||||||
"mq_unlink","mqueue.h","!defined(CONFIG_DISABLE_MQUEUE)","int","const char*"
|
"mq_unlink","mqueue.h","!defined(CONFIG_DISABLE_MQUEUE)","int","const char*"
|
||||||
"nx_task_spawn","nuttx/spawn.h","!defined(CONFIG_BUILD_KERNEL) && defined(CONFIG_LIB_SYSCALL)","int","FAR const struct spawn_syscall_parms_s *"
|
"nx_task_spawn","nuttx/spawn.h","defined(CONFIG_BUILD_PROTECTED)","int","FAR const struct spawn_syscall_parms_s *"
|
||||||
"nx_vsyslog","nuttx/syslog/syslog.h","","int","int","FAR const IPTR char*","FAR va_list*"
|
"nx_vsyslog","nuttx/syslog/syslog.h","","int","int","FAR const IPTR char*","FAR va_list*"
|
||||||
"on_exit","stdlib.h","defined(CONFIG_SCHED_ONEXIT)","int","CODE void (*)(int, FAR void *)","FAR void *"
|
"on_exit","stdlib.h","defined(CONFIG_SCHED_ONEXIT)","int","CODE void (*)(int, FAR void *)","FAR void *"
|
||||||
"open","fcntl.h","","int","const char*","int","..."
|
"open","fcntl.h","","int","const char*","int","..."
|
||||||
|
Can't render this file because it has a wrong number of fields in line 2.
|
@ -90,7 +90,9 @@ SYSCALL_LOOKUP(sem_unlink, 1, STUB_sem_unlink)
|
|||||||
|
|
||||||
#ifndef CONFIG_BUILD_KERNEL
|
#ifndef CONFIG_BUILD_KERNEL
|
||||||
SYSCALL_LOOKUP(task_create, 5, STUB_task_create)
|
SYSCALL_LOOKUP(task_create, 5, STUB_task_create)
|
||||||
|
#ifdef CONFIG_BUILD_PROTECTED
|
||||||
SYSCALL_LOOKUP(nx_task_spawn, 1, STUB_nx_task_spawn)
|
SYSCALL_LOOKUP(nx_task_spawn, 1, STUB_nx_task_spawn)
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
SYSCALL_LOOKUP(pgalloc, 2, STUB_pgalloc)
|
SYSCALL_LOOKUP(pgalloc, 2, STUB_pgalloc)
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user