From: Samuel Thibault Date: Thu, 13 Nov 2025 22:20:23 +0000 (+0100) Subject: htl: Move __pthread_cleanup_stack out of libc_pthread_init.c X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c933807a94ed4bd8211590179060120a2d530e7;p=thirdparty%2Fglibc.git htl: Move __pthread_cleanup_stack out of libc_pthread_init.c It does not actually need to be extern any more. --- diff --git a/htl/Versions b/htl/Versions index 2a83eb1b27..009c0d0e35 100644 --- a/htl/Versions +++ b/htl/Versions @@ -248,7 +248,6 @@ libc { GLIBC_PRIVATE { __libc_alloca_cutoff; __libc_pthread_init; - __pthread_cleanup_stack; __pthread_total; ___pthread_self; __pthread_alloc; diff --git a/htl/libc_pthread_init.c b/htl/libc_pthread_init.c index ca71af5d7a..b61a3a1d0a 100644 --- a/htl/libc_pthread_init.c +++ b/htl/libc_pthread_init.c @@ -19,8 +19,6 @@ #include #include -__thread struct __pthread_cancelation_handler *__pthread_cleanup_stack; - void __libc_pthread_init (const struct pthread_functions *functions) { diff --git a/htl/pt-cleanup.c b/htl/pt-cleanup.c index 76fdbe2918..054be1be4b 100644 --- a/htl/pt-cleanup.c +++ b/htl/pt-cleanup.c @@ -21,6 +21,8 @@ #include #include +static __thread struct __pthread_cancelation_handler *__pthread_cleanup_stack; + struct __pthread_cancelation_handler ** ___pthread_get_cleanup_stack (void) { diff --git a/htl/pt-internal.h b/htl/pt-internal.h index 1bab90cf93..2bc9d82d59 100644 --- a/htl/pt-internal.h +++ b/htl/pt-internal.h @@ -192,9 +192,6 @@ libc_hidden_proto (__pthread_max_threads) #ifndef _pthread_self extern struct __pthread *_pthread_self (void); #endif - -/* Stores the stack of cleanup handlers for the thread. */ -extern __thread struct __pthread_cancelation_handler *__pthread_cleanup_stack; /* Initialize the pthreads library. */