diff mbox series

[07/26] Linux: sched_setaffinity syscall number is always available

Message ID 954b0b3eb3c976b0d1144c3b5c7c00f13d572dc7.1581279333.git.fweimer@redhat.com
State New
Headers show
Series Linux cleanups enabled by built-in system call tables | expand

Commit Message

Florian Weimer Feb. 9, 2020, 8:20 p.m. UTC
Due to the built-in tables, __NR_sched_setaffinity is always defined.
---
 sysdeps/unix/sysv/linux/sched_setaffinity.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

Comments

Adhemerval Zanella Feb. 27, 2020, 11:06 p.m. UTC | #1
On 09/02/2020 17:20, Florian Weimer wrote:
> Due to the built-in tables, __NR_sched_setaffinity is always defined.

LGTM, thanks. 

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>

> ---
>  sysdeps/unix/sysv/linux/sched_setaffinity.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
> 
> diff --git a/sysdeps/unix/sysv/linux/sched_setaffinity.c b/sysdeps/unix/sysv/linux/sched_setaffinity.c
> index bc0c42ce52..fc2c692783 100644
> --- a/sysdeps/unix/sysv/linux/sched_setaffinity.c
> +++ b/sysdeps/unix/sysv/linux/sched_setaffinity.c
> @@ -24,8 +24,6 @@
>  #include <shlib-compat.h>
>  
>  
> -#ifdef __NR_sched_setaffinity
> -
>  extern int __sched_setaffinity_new (pid_t, size_t, const cpu_set_t *);
>  libc_hidden_proto (__sched_setaffinity_new)
>  
> @@ -46,7 +44,7 @@ versioned_symbol (libc, __sched_setaffinity_new, sched_setaffinity,
>  		  GLIBC_2_3_4);
>  
>  
> -# if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)
> +#if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)
>  int
>  attribute_compat_text_section
>  __sched_setaffinity_old (pid_t pid, const cpu_set_t *cpuset)
> @@ -55,7 +53,4 @@ __sched_setaffinity_old (pid_t pid, const cpu_set_t *cpuset)
>    return __sched_setaffinity_new (pid, 128, cpuset);
>  }
>  compat_symbol (libc, __sched_setaffinity_old, sched_setaffinity, GLIBC_2_3_3);
> -# endif
> -#else
> -# include <posix/sched_setaffinity.c>
>  #endif
>
diff mbox series

Patch

diff --git a/sysdeps/unix/sysv/linux/sched_setaffinity.c b/sysdeps/unix/sysv/linux/sched_setaffinity.c
index bc0c42ce52..fc2c692783 100644
--- a/sysdeps/unix/sysv/linux/sched_setaffinity.c
+++ b/sysdeps/unix/sysv/linux/sched_setaffinity.c
@@ -24,8 +24,6 @@ 
 #include <shlib-compat.h>
 
 
-#ifdef __NR_sched_setaffinity
-
 extern int __sched_setaffinity_new (pid_t, size_t, const cpu_set_t *);
 libc_hidden_proto (__sched_setaffinity_new)
 
@@ -46,7 +44,7 @@  versioned_symbol (libc, __sched_setaffinity_new, sched_setaffinity,
 		  GLIBC_2_3_4);
 
 
-# if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)
+#if SHLIB_COMPAT (libc, GLIBC_2_3_3, GLIBC_2_3_4)
 int
 attribute_compat_text_section
 __sched_setaffinity_old (pid_t pid, const cpu_set_t *cpuset)
@@ -55,7 +53,4 @@  __sched_setaffinity_old (pid_t pid, const cpu_set_t *cpuset)
   return __sched_setaffinity_new (pid, 128, cpuset);
 }
 compat_symbol (libc, __sched_setaffinity_old, sched_setaffinity, GLIBC_2_3_3);
-# endif
-#else
-# include <posix/sched_setaffinity.c>
 #endif