aboutsummaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
Diffstat (limited to 'nptl')
-rw-r--r--nptl/Makefile2
-rw-r--r--nptl/Versions14
-rw-r--r--nptl/libpthread-compat.c24
-rw-r--r--nptl/pthreadP.h7
-rw-r--r--nptl/pthread_create.c11
-rw-r--r--nptl/pthread_getattr_default_np.c6
6 files changed, 38 insertions, 26 deletions
diff --git a/nptl/Makefile b/nptl/Makefile
index 700027c..a6e3b61 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -108,6 +108,7 @@ routines = \
pthread_condattr_init \
pthread_condattr_setclock \
pthread_condattr_setpshared \
+ pthread_create \
pthread_detach \
pthread_equal \
pthread_exit \
@@ -210,7 +211,6 @@ libpthread-routines = \
libpthread-compat \
nptl-init \
pt-interp \
- pthread_create \
version \
libpthread-shared-only-routines = \
diff --git a/nptl/Versions b/nptl/Versions
index 8450018..0db56bc 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -38,6 +38,7 @@ libc {
pthread_cond_wait;
pthread_condattr_destroy;
pthread_condattr_init;
+ pthread_create;
pthread_detach;
pthread_equal;
pthread_exit;
@@ -80,6 +81,7 @@ libc {
pthread_attr_setguardsize;
pthread_attr_setstackaddr;
pthread_attr_setstacksize;
+ pthread_create;
pthread_getconcurrency;
pthread_mutexattr_gettype;
pthread_mutexattr_settype;
@@ -217,6 +219,7 @@ libc {
mtx_trylock;
mtx_unlock;
thrd_current;
+ thrd_create;
thrd_detach;
thrd_equal;
thrd_exit;
@@ -358,6 +361,7 @@ libc {
sem_trywait;
sem_unlink;
sem_wait;
+ thrd_create;
thrd_detach;
thrd_exit;
thrd_join;
@@ -409,8 +413,6 @@ libc {
__pthread_enable_asynccancel;
__pthread_force_elision;
__pthread_get_minstack;
- __pthread_getattr_default_np;
- __pthread_getattr_default_np;
__pthread_keys;
__pthread_mutex_unlock_usercnt;
__pthread_setcancelstate;
@@ -438,7 +440,7 @@ libpthread {
}
GLIBC_2.1 {
- pthread_create;
+ __libpthread_version_placeholder;
}
GLIBC_2.1.1 {
@@ -495,9 +497,11 @@ libpthread {
GLIBC_2.19 {
}
- # C11 thread symbols.
GLIBC_2.28 {
- thrd_create;
+ __libpthread_version_placeholder;
+ }
+
+ GLIBC_2.29 {
}
GLIBC_2.30 {
diff --git a/nptl/libpthread-compat.c b/nptl/libpthread-compat.c
index 7e3e7aa..2dcf175 100644
--- a/nptl/libpthread-compat.c
+++ b/nptl/libpthread-compat.c
@@ -28,14 +28,11 @@ __libpthread_version_placeholder_1 (void)
}
#endif
-/* This is an unused compatibility symbol definition, to prevent ld
- from creating a weak version definition for GLIBC_2.1.2. (__vfork
- used to be defined at that version, but it is now provided by libc,
- and there are no versions left in libpthread for that symbol
- version.) If the ABI baseline for glibc is the GLIBC_2.2 symbol
- version or later, the placeholder symbol is not needed because
- there are plenty of other symbols which populate those later
- versions. */
+#if (SHLIB_COMPAT (libpthread, GLIBC_2_1, GLIBC_2_2))
+compat_symbol (libpthread, __libpthread_version_placeholder_1,
+ __libpthread_version_placeholder, GLIBC_2_1);
+#endif
+
#if (SHLIB_COMPAT (libpthread, GLIBC_2_1_1, GLIBC_2_1_2))
compat_symbol (libpthread, __libpthread_version_placeholder_1,
__libpthread_version_placeholder, GLIBC_2_1_1);
@@ -45,12 +42,8 @@ compat_symbol (libpthread, __libpthread_version_placeholder_1,
__libpthread_version_placeholder, GLIBC_2_1_2);
#endif
-/* Do not create the placeholder symbol version if there are other
- symbols left that keep the version around (because GLIBC_2.0 got
- promoted to GLIBC_2.2). */
#if SHLIB_COMPAT (libpthread, GLIBC_2_2, GLIBC_2_2_3) \
- && ABI_libpthread_GLIBC_2_2 != ABI_libpthread_GLIBC_2_0 \
- && ABI_libpthread_GLIBC_2_2 != ABI_libpthread_GLIBC_2_1_3
+ && ABI_libpthread_GLIBC_2_2 != ABI_libpthread_GLIBC_2_0
compat_symbol (libpthread, __libpthread_version_placeholder_1,
__libpthread_version_placeholder, GLIBC_2_2);
#endif
@@ -101,6 +94,11 @@ compat_symbol (libpthread, __libpthread_version_placeholder_1,
__libpthread_version_placeholder, GLIBC_2_18);
#endif
+#if (SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_29))
+compat_symbol (libpthread, __libpthread_version_placeholder_1,
+ __libpthread_version_placeholder, GLIBC_2_28);
+#endif
+
#if (SHLIB_COMPAT (libpthread, GLIBC_2_30, GLIBC_2_31))
compat_symbol (libpthread, __libpthread_version_placeholder_1,
__libpthread_version_placeholder, GLIBC_2_30);
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index 3151842..05f2bae 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -314,9 +314,10 @@ libc_hidden_proto (__pthread_cleanup_upto)
/* Functions with versioned interfaces. */
-extern int __pthread_create_2_1 (pthread_t *newthread,
- const pthread_attr_t *attr,
- void *(*start_routine) (void *), void *arg);
+extern int __pthread_create (pthread_t *newthread,
+ const pthread_attr_t *attr,
+ void *(*start_routine) (void *), void *arg);
+libc_hidden_proto (__pthread_create)
extern int __pthread_create_2_0 (pthread_t *newthread,
const pthread_attr_t *attr,
void *(*start_routine) (void *), void *arg);
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index 438b8a7..5680687 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -762,10 +762,17 @@ __pthread_create_2_1 (pthread_t *newthread, const pthread_attr_t *attr,
return retval;
}
-versioned_symbol (libpthread, __pthread_create_2_1, pthread_create, GLIBC_2_1);
+versioned_symbol (libc, __pthread_create_2_1, pthread_create, GLIBC_2_34);
+libc_hidden_ver (__pthread_create_2_1, __pthread_create)
+#ifndef SHARED
+strong_alias (__pthread_create_2_1, __pthread_create)
+#endif
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_1, GLIBC_2_34)
+compat_symbol (libpthread, __pthread_create_2_1, pthread_create, GLIBC_2_1);
+#endif
-#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_1)
int
__pthread_create_2_0 (pthread_t *newthread, const pthread_attr_t *attr,
void *(*start_routine) (void *), void *arg)
diff --git a/nptl/pthread_getattr_default_np.c b/nptl/pthread_getattr_default_np.c
index f38f687..ad10a27 100644
--- a/nptl/pthread_getattr_default_np.c
+++ b/nptl/pthread_getattr_default_np.c
@@ -29,8 +29,10 @@ ___pthread_getattr_default_np (pthread_attr_t *out)
}
versioned_symbol (libc, ___pthread_getattr_default_np,
pthread_getattr_default_np, GLIBC_2_34);
-versioned_symbol (libc, ___pthread_getattr_default_np,
- __pthread_getattr_default_np, GLIBC_PRIVATE);
+libc_hidden_ver (___pthread_getattr_default_np, __pthread_getattr_default_np)
+#ifndef SHARED
+strong_alias (___pthread_getattr_default_np, __pthread_getattr_default_np)
+#endif
#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_18, GLIBC_2_34)
compat_symbol (libpthread, ___pthread_getattr_default_np,