[16/26] Linux: set_tid_address syscall number is always available

Message ID c108ce5c715d767bc13e181ddc9f944e7aa3b962.1581279333.git.fweimer@redhat.com
State New
Headers show
Series
  • Linux cleanups enabled by built-in system call tables
Related show

Commit Message

Florian Weimer Feb. 9, 2020, 8:20 p.m.
Due to the built-in tables, __NR_set_tid_address is always defined.
---
 sysdeps/unix/sysv/linux/nscd_setup_thread.c | 2 --
 1 file changed, 2 deletions(-)

-- 
2.24.1

Comments

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


LGTM, thanks. 

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


> ---

>  sysdeps/unix/sysv/linux/nscd_setup_thread.c | 2 --

>  1 file changed, 2 deletions(-)

> 

> diff --git a/sysdeps/unix/sysv/linux/nscd_setup_thread.c b/sysdeps/unix/sysv/linux/nscd_setup_thread.c

> index 6e14918be0..a49676f4b4 100644

> --- a/sysdeps/unix/sysv/linux/nscd_setup_thread.c

> +++ b/sysdeps/unix/sysv/linux/nscd_setup_thread.c

> @@ -25,7 +25,6 @@

>  int

>  setup_thread (struct database_dyn *db)

>  {

> -#ifdef __NR_set_tid_address

>    /* Only supported when NPTL is used.  */

>    char buf[100];

>    if (confstr (_CS_GNU_LIBPTHREAD_VERSION, buf, sizeof (buf)) >= sizeof (buf)

> @@ -43,7 +42,6 @@ setup_thread (struct database_dyn *db)

>         So, set the field to a nonzero value which indicates that nscd

>         is certainly running and clients can skip the test.  */

>      return db->head->nscd_certainly_running = 1;

> -#endif

>  

>    return 0;

>  }

>

Patch

diff --git a/sysdeps/unix/sysv/linux/nscd_setup_thread.c b/sysdeps/unix/sysv/linux/nscd_setup_thread.c
index 6e14918be0..a49676f4b4 100644
--- a/sysdeps/unix/sysv/linux/nscd_setup_thread.c
+++ b/sysdeps/unix/sysv/linux/nscd_setup_thread.c
@@ -25,7 +25,6 @@ 
 int
 setup_thread (struct database_dyn *db)
 {
-#ifdef __NR_set_tid_address
   /* Only supported when NPTL is used.  */
   char buf[100];
   if (confstr (_CS_GNU_LIBPTHREAD_VERSION, buf, sizeof (buf)) >= sizeof (buf)
@@ -43,7 +42,6 @@  setup_thread (struct database_dyn *db)
        So, set the field to a nonzero value which indicates that nscd
        is certainly running and clients can skip the test.  */
     return db->head->nscd_certainly_running = 1;
-#endif
 
   return 0;
 }