about summary refs log tree commit diff
path: root/nptl
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-02-22 18:30:52 +0100
committerFlorian Weimer <fweimer@redhat.com>2021-02-22 18:30:52 +0100
commit2f4019de81024cc0d05a5b5cedb1afb28b59a836 (patch)
treef837cbd8ac7933828e56baa291384b7b99edeb07 /nptl
parent541e53c9ddd9ef543cc45b66c7597e63fa665414 (diff)
downloadglibc-2f4019de81024cc0d05a5b5cedb1afb28b59a836.tar.gz
glibc-2f4019de81024cc0d05a5b5cedb1afb28b59a836.tar.xz
glibc-2f4019de81024cc0d05a5b5cedb1afb28b59a836.zip
nptl: Move lowlevellock into libc [BZ #15648]
And export __lll_lock_wait and __lll_lock_wait_private as
GLIBC_PRIVATE.  This should eliminate the need for the previous
riscv kludge.
Diffstat (limited to 'nptl')
-rw-r--r--nptl/Makefile3
-rw-r--r--nptl/Versions2
-rw-r--r--nptl/libc-lowlevellock.c20
-rw-r--r--nptl/lowlevellock.c6
4 files changed, 5 insertions, 26 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index 5a7558d943..62f368af1e 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -33,9 +33,9 @@ routines = \
   forward \
   libc-cancellation \
   libc-cleanup \
-  libc-lowlevellock \
   libc_multiple_threads \
   libc_pthread_init \
+  lowlevellock \
   old_pthread_cond_destroy \
   old_pthread_cond_init \
   pthread_atfork \
@@ -100,7 +100,6 @@ libpthread-routines = \
   futex-internal \
   herrno \
   libpthread-compat \
-  lowlevellock \
   nptl-init \
   nptlfreeres \
   old_pthread_atfork \
diff --git a/nptl/Versions b/nptl/Versions
index 7254ca4750..694747bb44 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -77,6 +77,8 @@ libc {
     __libc_current_sigrtmin_private;
     __libc_dl_error_tsd;
     __libc_pthread_init;
+    __lll_lock_wait;
+    __lll_lock_wait_private;
     __pthread_attr_copy;
     __pthread_attr_destroy;
     __pthread_attr_init;
diff --git a/nptl/libc-lowlevellock.c b/nptl/libc-lowlevellock.c
deleted file mode 100644
index e840399c41..0000000000
--- a/nptl/libc-lowlevellock.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright (C) 2003-2021 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Paul Mackerras <paulus@au.ibm.com>, 2003.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <https://www.gnu.org/licenses/>.  */
-
-/* No difference to lowlevellock.c, except we lose a couple of functions.  */
-#include <lowlevellock.c>
diff --git a/nptl/lowlevellock.c b/nptl/lowlevellock.c
index 1ea397d5cb..7976c6d8f5 100644
--- a/nptl/lowlevellock.c
+++ b/nptl/lowlevellock.c
@@ -35,10 +35,8 @@ __lll_lock_wait_private (int *futex)
       futex_wait ((unsigned int *) futex, 2, LLL_PRIVATE); /* Wait if *futex == 2.  */
     }
 }
+libc_hidden_def (__lll_lock_wait_private)
 
-
-/* This function doesn't get included in libc.  */
-#if IS_IN (libpthread)
 void
 __lll_lock_wait (int *futex, int private)
 {
@@ -52,4 +50,4 @@ __lll_lock_wait (int *futex, int private)
       futex_wait ((unsigned int *) futex, 2, private); /* Wait if *futex == 2.  */
     }
 }
-#endif
+libc_hidden_def (__lll_lock_wait)