1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-06 12:01:08 +03:00

htl: move pthread_getname_np/setname_np into libc.

Message-ID: <20251118125044.1160780-2-gfleury@disroot.org>
This commit is contained in:
gfleury
2025-11-18 14:50:43 +02:00
committed by Samuel Thibault
parent 77f446346a
commit bb3524a879
9 changed files with 40 additions and 10 deletions

View File

@@ -29,8 +29,6 @@ libpthread-routines := \
pt-hurd-cond-wait \ pt-hurd-cond-wait \
pt-hurd-cond-timedwait \ pt-hurd-cond-timedwait \
pt-spin \ pt-spin \
pt-getname-np \
pt-setname-np \
# libpthread-routine # libpthread-routine
headers := \ headers := \
@@ -122,6 +120,7 @@ routines := \
pt-getattr \ pt-getattr \
pt-getconcurrency \ pt-getconcurrency \
pt-getcpuclockid \ pt-getcpuclockid \
pt-getname-np \
pt-getschedparam \ pt-getschedparam \
pt-getspecific \ pt-getspecific \
pt-init-specific \ pt-init-specific \
@@ -174,6 +173,7 @@ routines := \
pt-setcancelstate \ pt-setcancelstate \
pt-setcanceltype \ pt-setcanceltype \
pt-setconcurrency \ pt-setconcurrency \
pt-setname-np \
pt-setschedparam \ pt-setschedparam \
pt-setschedprio \ pt-setschedprio \
pt-setspecific \ pt-setspecific \

View File

@@ -157,6 +157,11 @@ libc {
sem_clockwait; sem_clockwait;
} }
GLIBC_2.40 {
pthread_getname_np;
pthread_setname_np;
}
GLIBC_2.41 { GLIBC_2.41 {
pthread_attr_getguardsize; pthread_attr_getguardsize;
pthread_attr_getstacksize; pthread_attr_getstacksize;
@@ -225,10 +230,12 @@ libc {
pthread_getattr_np; pthread_getattr_np;
pthread_getconcurrency; pthread_getconcurrency;
pthread_getcpuclockid; pthread_getcpuclockid;
pthread_getname_np;
pthread_join; pthread_join;
pthread_kill; pthread_kill;
pthread_mutex_transfer_np; pthread_mutex_transfer_np;
pthread_setconcurrency; pthread_setconcurrency;
pthread_setname_np;
pthread_setschedprio; pthread_setschedprio;
pthread_testcancel; pthread_testcancel;
pthread_timedjoin_np; pthread_timedjoin_np;
@@ -345,7 +352,6 @@ libpthread {
} }
GLIBC_2.40 { GLIBC_2.40 {
pthread_getname_np; __libpthread_version_placeholder;
pthread_setname_np;
} }
} }

View File

@@ -225,6 +225,11 @@ int __pthread_setconcurrency (int __new_level);
libc_hidden_proto (__pthread_setconcurrency) libc_hidden_proto (__pthread_setconcurrency)
int __pthread_getconcurrency (void); int __pthread_getconcurrency (void);
libc_hidden_proto (__pthread_getconcurrency) libc_hidden_proto (__pthread_getconcurrency)
int __pthread_getname_np (pthread_t __target_thread, char *__buf,
size_t __buflen);
libc_hidden_proto (__pthread_getname_np)
int __pthread_setname_np (pthread_t __target_thread, const char *__name);
libc_hidden_proto (__pthread_setname_np)
#define __pthread_raise_internal(__sig) raise (__sig) #define __pthread_raise_internal(__sig) raise (__sig)

View File

@@ -23,6 +23,9 @@
#include <string.h> #include <string.h>
#include <pt-internal.h> #include <pt-internal.h>
#include <string.h>
#include <shlib-compat.h>
#include <ldsodefs.h>
int int
__pthread_getname_np (pthread_t thread, char *buf, size_t len) __pthread_getname_np (pthread_t thread, char *buf, size_t len)
@@ -64,4 +67,9 @@ __pthread_getname_np (pthread_t thread, char *buf, size_t len)
#endif #endif
} }
weak_alias (__pthread_getname_np, pthread_getname_np) libc_hidden_def (__pthread_getname_np)
versioned_symbol (libc, __pthread_getname_np, pthread_getname_np, GLIBC_2_43);
#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_40, GLIBC_2_43)
compat_symbol (libc, __pthread_getname_np, pthread_getname_np, GLIBC_2_40);
#endif

View File

@@ -22,6 +22,8 @@
#include <string.h> #include <string.h>
#include <pt-internal.h> #include <pt-internal.h>
#include <shlib-compat.h>
#include <ldsodefs.h>
int int
__pthread_setname_np (pthread_t thread, const char *name) __pthread_setname_np (pthread_t thread, const char *name)
@@ -49,4 +51,9 @@ __pthread_setname_np (pthread_t thread, const char *name)
#endif #endif
} }
weak_alias (__pthread_setname_np, pthread_setname_np) libc_hidden_def (__pthread_setname_np)
versioned_symbol (libc, __pthread_setname_np, pthread_setname_np, GLIBC_2_43);
#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_40, GLIBC_2_43)
compat_symbol (libpthread, __pthread_setname_np, pthread_setname_np, GLIBC_2_40);
#endif

View File

@@ -2598,6 +2598,8 @@ GLIBC_2.4 readlinkat F
GLIBC_2.4 renameat F GLIBC_2.4 renameat F
GLIBC_2.4 symlinkat F GLIBC_2.4 symlinkat F
GLIBC_2.4 unlinkat F GLIBC_2.4 unlinkat F
GLIBC_2.40 pthread_getname_np F
GLIBC_2.40 pthread_setname_np F
GLIBC_2.41 pthread_attr_getguardsize F GLIBC_2.41 pthread_attr_getguardsize F
GLIBC_2.41 pthread_attr_getstack F GLIBC_2.41 pthread_attr_getstack F
GLIBC_2.41 pthread_attr_getstackaddr F GLIBC_2.41 pthread_attr_getstackaddr F
@@ -2676,10 +2678,12 @@ GLIBC_2.43 pthread_detach F
GLIBC_2.43 pthread_getattr_np F GLIBC_2.43 pthread_getattr_np F
GLIBC_2.43 pthread_getconcurrency F GLIBC_2.43 pthread_getconcurrency F
GLIBC_2.43 pthread_getcpuclockid F GLIBC_2.43 pthread_getcpuclockid F
GLIBC_2.43 pthread_getname_np F
GLIBC_2.43 pthread_join F GLIBC_2.43 pthread_join F
GLIBC_2.43 pthread_kill F GLIBC_2.43 pthread_kill F
GLIBC_2.43 pthread_mutex_transfer_np F GLIBC_2.43 pthread_mutex_transfer_np F
GLIBC_2.43 pthread_setconcurrency F GLIBC_2.43 pthread_setconcurrency F
GLIBC_2.43 pthread_setname_np F
GLIBC_2.43 pthread_setschedprio F GLIBC_2.43 pthread_setschedprio F
GLIBC_2.43 pthread_testcancel F GLIBC_2.43 pthread_testcancel F
GLIBC_2.43 pthread_timedjoin_np F GLIBC_2.43 pthread_timedjoin_np F

View File

@@ -33,5 +33,3 @@ GLIBC_2.32 tss_create F
GLIBC_2.32 tss_delete F GLIBC_2.32 tss_delete F
GLIBC_2.32 tss_get F GLIBC_2.32 tss_get F
GLIBC_2.32 tss_set F GLIBC_2.32 tss_set F
GLIBC_2.40 pthread_getname_np F
GLIBC_2.40 pthread_setname_np F

View File

@@ -2276,6 +2276,8 @@ GLIBC_2.39 stdc_trailing_zeros_ui F
GLIBC_2.39 stdc_trailing_zeros_ul F GLIBC_2.39 stdc_trailing_zeros_ul F
GLIBC_2.39 stdc_trailing_zeros_ull F GLIBC_2.39 stdc_trailing_zeros_ull F
GLIBC_2.39 stdc_trailing_zeros_us F GLIBC_2.39 stdc_trailing_zeros_us F
GLIBC_2.40 pthread_getname_np F
GLIBC_2.40 pthread_setname_np F
GLIBC_2.41 pthread_attr_getguardsize F GLIBC_2.41 pthread_attr_getguardsize F
GLIBC_2.41 pthread_attr_getstack F GLIBC_2.41 pthread_attr_getstack F
GLIBC_2.41 pthread_attr_getstackaddr F GLIBC_2.41 pthread_attr_getstackaddr F
@@ -2354,10 +2356,12 @@ GLIBC_2.43 pthread_detach F
GLIBC_2.43 pthread_getattr_np F GLIBC_2.43 pthread_getattr_np F
GLIBC_2.43 pthread_getconcurrency F GLIBC_2.43 pthread_getconcurrency F
GLIBC_2.43 pthread_getcpuclockid F GLIBC_2.43 pthread_getcpuclockid F
GLIBC_2.43 pthread_getname_np F
GLIBC_2.43 pthread_join F GLIBC_2.43 pthread_join F
GLIBC_2.43 pthread_kill F GLIBC_2.43 pthread_kill F
GLIBC_2.43 pthread_mutex_transfer_np F GLIBC_2.43 pthread_mutex_transfer_np F
GLIBC_2.43 pthread_setconcurrency F GLIBC_2.43 pthread_setconcurrency F
GLIBC_2.43 pthread_setname_np F
GLIBC_2.43 pthread_setschedprio F GLIBC_2.43 pthread_setschedprio F
GLIBC_2.43 pthread_testcancel F GLIBC_2.43 pthread_testcancel F
GLIBC_2.43 pthread_timedjoin_np F GLIBC_2.43 pthread_timedjoin_np F

View File

@@ -32,5 +32,3 @@ GLIBC_2.38 tss_create F
GLIBC_2.38 tss_delete F GLIBC_2.38 tss_delete F
GLIBC_2.38 tss_get F GLIBC_2.38 tss_get F
GLIBC_2.38 tss_set F GLIBC_2.38 tss_set F
GLIBC_2.40 pthread_getname_np F
GLIBC_2.40 pthread_setname_np F