From b401db5ca418df871bc5b10b7caf0bd05344d092 Mon Sep 17 00:00:00 2001 From: Michael Jung Date: Tue, 8 Nov 2022 15:57:28 +0100 Subject: [PATCH] prctl syscall is present unconditionally I had a link problem regarding prctl while CONFIG_TASK_NAME_SIZE was defined 0 and building in protected mode. Turns out in monolithic build prctl is present no matter what CONFIG_TASK_NAME_SIZE, but in protected mode build its only present if CONFIG_TASK_NAME_SIZE > 0. So, bring protected mode build in sync with the monolithic one. Signed-off-by: Michael Jung --- include/sys/syscall_lookup.h | 7 +------ syscall/syscall.csv | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/include/sys/syscall_lookup.h b/include/sys/syscall_lookup.h index 057a4395dd..c751b902e7 100644 --- a/include/sys/syscall_lookup.h +++ b/include/sys/syscall_lookup.h @@ -27,6 +27,7 @@ SYSCALL_LOOKUP1(_exit, 1) SYSCALL_LOOKUP(getpid, 0) SYSCALL_LOOKUP(gettid, 0) +SYSCALL_LOOKUP(prctl, 2) #ifdef CONFIG_SCHED_HAVE_PARENT SYSCALL_LOOKUP(getppid, 0) @@ -368,12 +369,6 @@ SYSCALL_LOOKUP(futimens, 2) SYSCALL_LOOKUP(socketpair, 4) #endif -/* The following is defined only if CONFIG_TASK_NAME_SIZE > 0 */ - -#if CONFIG_TASK_NAME_SIZE > 0 - SYSCALL_LOOKUP(prctl, 2) -#endif - /* The following is defined only if entropy pool random number generator * is enabled. */ diff --git a/syscall/syscall.csv b/syscall/syscall.csv index 4ae54a2de4..613de8463a 100644 --- a/syscall/syscall.csv +++ b/syscall/syscall.csv @@ -80,7 +80,7 @@ "poll","poll.h","","int","FAR struct pollfd *","nfds_t","int" "posix_spawn","spawn.h","!defined(CONFIG_BINFMT_DISABLE) && defined(CONFIG_LIBC_EXECFUNCS)","int","FAR pid_t *","FAR const char *","FAR const posix_spawn_file_actions_t *","FAR const posix_spawnattr_t *","FAR char * const []|FAR char * const *","FAR char * const []|FAR char * const *" "ppoll","poll.h","","int","FAR struct pollfd *","nfds_t","FAR const struct timespec *","FAR const sigset_t *" -"prctl","sys/prctl.h", "CONFIG_TASK_NAME_SIZE > 0","int","int","...","uintptr_t","uintptr_t" +"prctl","sys/prctl.h","","int","int","...","uintptr_t","uintptr_t" "pread","unistd.h","","ssize_t","int","FAR void *","size_t","off_t" "pselect","sys/select.h","","int","int","FAR fd_set *","FAR fd_set *","FAR fd_set *","FAR const struct timespec *","FAR const sigset_t *" "pthread_cancel","pthread.h","!defined(CONFIG_DISABLE_PTHREAD)","int","pthread_t"