From patchwork Tue Jan 14 18:52:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 1222998 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-108665-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha1 header.s=default header.b=wyvJxd/e; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47y03f0pWyz9s29 for ; Wed, 15 Jan 2020 05:53:49 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; q=dns; s= default; b=phye4PNNoxMTdpzL1I3JWBy7++obvLv7muA5xEfgx7OepJf/SrrCV 7m9ogQXXlAf+IAvgk8VLoVAVniyGY2S//WBAPnicJEFnf9nEnomFpPPZuWNC+Np6 Hq5gNp4m9AhpdGA1CnMGKkIMmM+4SnAjkoJk2unFSIjUP5Wbb+YVRI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; s=default; bh=+69pL/Pj9lPTpeNYsrJNJqBadqg=; b=wyvJxd/egzYIjI1v52FSbuQjt970 xCJd1aBdAk4Ak9QgYfW/sQaMpGdus0TSn15sf+zBmu9PaJGTumtuJEAMWuniRLL6 mtMVfxmrNjUaxMR2/dFWAXDlyXeWZRtPVz2BwU3DGhdheLBLLYchZg2WW+qSNVwH uX/fFMib604H2SM= Received: (qmail 91936 invoked by alias); 14 Jan 2020 18:53:17 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 91808 invoked by uid 89); 14 Jan 2020 18:53:16 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NEUTRAL autolearn=ham version=3.3.1 spammy=HContent-Transfer-Encoding:8bit X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault Subject: [PATCH 01/10] htl: Rename _pthread_mutex_init/destroy to __pthread_mutex_init/destroy Date: Tue, 14 Jan 2020 19:52:46 +0100 Message-Id: <20200114185255.25813-3-samuel.thibault@ens-lyon.org> In-Reply-To: <20200114185255.25813-1-samuel.thibault@ens-lyon.org> References: <20200114185255.25813-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 --- htl/Versions | 2 ++ htl/pt-initialize.c | 4 ++-- sysdeps/htl/pt-key.h | 2 +- sysdeps/htl/pt-mutex-destroy.c | 4 ++-- sysdeps/htl/pt-mutex-init.c | 4 ++-- sysdeps/htl/pthreadP.h | 5 +++-- sysdeps/mach/hurd/htl/pt-mutex-destroy.c | 4 ++-- sysdeps/mach/hurd/htl/pt-mutex-init.c | 6 +++--- sysdeps/mach/hurd/i386/libpthread.abilist | 2 -- 9 files changed, 17 insertions(+), 16 deletions(-) diff --git a/htl/Versions b/htl/Versions index 77f7335b9c..3ae4b5c17d 100644 --- a/htl/Versions +++ b/htl/Versions @@ -155,6 +155,8 @@ libpthread { __pthread_setspecific; __pthread_getattr_np; __pthread_attr_getstack; + __pthread_mutex_init; + __pthread_mutex_destroy; __pthread_mutex_timedlock; } } diff --git a/htl/pt-initialize.c b/htl/pt-initialize.c index d5a64f7cd9..89ed742422 100644 --- a/htl/pt-initialize.c +++ b/htl/pt-initialize.c @@ -51,8 +51,8 @@ static const struct pthread_functions pthread_functions = { .ptr___pthread_exit = __pthread_exit, .ptr_pthread_getschedparam = __pthread_getschedparam, .ptr_pthread_setschedparam = __pthread_setschedparam, - .ptr_pthread_mutex_destroy = _pthread_mutex_destroy, - .ptr_pthread_mutex_init = _pthread_mutex_init, + .ptr_pthread_mutex_destroy = __pthread_mutex_destroy, + .ptr_pthread_mutex_init = __pthread_mutex_init, .ptr_pthread_mutex_lock = __pthread_mutex_lock, .ptr_pthread_mutex_trylock = __pthread_mutex_trylock, .ptr_pthread_mutex_unlock = __pthread_mutex_unlock, diff --git a/sysdeps/htl/pt-key.h b/sysdeps/htl/pt-key.h index bfaa19900a..b547e8ad29 100644 --- a/sysdeps/htl/pt-key.h +++ b/sysdeps/htl/pt-key.h @@ -66,7 +66,7 @@ __pthread_key_lock_ready (void) err = __pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE); assert_perror (err); - err = _pthread_mutex_init (&__pthread_key_lock, &attr); + err = __pthread_mutex_init (&__pthread_key_lock, &attr); assert_perror (err); err = __pthread_mutexattr_destroy (&attr); diff --git a/sysdeps/htl/pt-mutex-destroy.c b/sysdeps/htl/pt-mutex-destroy.c index 3824e62dd4..796fc11b8d 100644 --- a/sysdeps/htl/pt-mutex-destroy.c +++ b/sysdeps/htl/pt-mutex-destroy.c @@ -23,7 +23,7 @@ #include int -_pthread_mutex_destroy (pthread_mutex_t *mutex) +__pthread_mutex_destroy (pthread_mutex_t *mutex) { if (mutex->__attr == __PTHREAD_ERRORCHECK_MUTEXATTR || mutex->__attr == __PTHREAD_RECURSIVE_MUTEXATTR) @@ -35,4 +35,4 @@ _pthread_mutex_destroy (pthread_mutex_t *mutex) return 0; } -strong_alias (_pthread_mutex_destroy, pthread_mutex_destroy); +strong_alias (__pthread_mutex_destroy, pthread_mutex_destroy); diff --git a/sysdeps/htl/pt-mutex-init.c b/sysdeps/htl/pt-mutex-init.c index c59bd8a3f5..77f041352e 100644 --- a/sysdeps/htl/pt-mutex-init.c +++ b/sysdeps/htl/pt-mutex-init.c @@ -24,7 +24,7 @@ #include int -_pthread_mutex_init (pthread_mutex_t *mutex, const pthread_mutexattr_t *attr) +__pthread_mutex_init (pthread_mutex_t *mutex, const pthread_mutexattr_t *attr) { *mutex = (pthread_mutex_t) __PTHREAD_MUTEX_INITIALIZER; @@ -47,4 +47,4 @@ _pthread_mutex_init (pthread_mutex_t *mutex, const pthread_mutexattr_t *attr) return 0; } -strong_alias (_pthread_mutex_init, pthread_mutex_init); +strong_alias (__pthread_mutex_init, pthread_mutex_init); diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index affe7cdf53..c6ddf76fd4 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -27,7 +27,8 @@ extern pthread_t __pthread_self (void); extern int __pthread_kill (pthread_t threadid, int signo); extern struct __pthread **__pthread_threads; -extern int _pthread_mutex_init (pthread_mutex_t *mutex, const pthread_mutexattr_t *attr); +extern int __pthread_mutex_init (pthread_mutex_t *__mutex, const pthread_mutexattr_t *__attr); +extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex); extern int __pthread_mutex_lock (pthread_mutex_t *__mutex); extern int __pthread_mutex_timedlock (pthread_mutex_t *__mutex, const struct timespec *__abstime); @@ -73,7 +74,7 @@ struct __pthread_cancelation_handler **___pthread_get_cleanup_stack (void) attri hidden_proto (__pthread_key_create) hidden_proto (__pthread_getspecific) hidden_proto (__pthread_setspecific) -hidden_proto (_pthread_mutex_init) +hidden_proto (__pthread_mutex_init) #endif #define ASSERT_TYPE_SIZE(type, size) \ diff --git a/sysdeps/mach/hurd/htl/pt-mutex-destroy.c b/sysdeps/mach/hurd/htl/pt-mutex-destroy.c index afab03234e..a8a0adc03f 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex-destroy.c +++ b/sysdeps/mach/hurd/htl/pt-mutex-destroy.c @@ -24,7 +24,7 @@ #include int -_pthread_mutex_destroy (pthread_mutex_t *mtxp) +__pthread_mutex_destroy (pthread_mutex_t *mtxp) { atomic_read_barrier (); if (*(volatile unsigned int *) &mtxp->__lock != 0) @@ -34,4 +34,4 @@ _pthread_mutex_destroy (pthread_mutex_t *mtxp) return 0; } -strong_alias (_pthread_mutex_destroy, pthread_mutex_destroy) +strong_alias (__pthread_mutex_destroy, pthread_mutex_destroy) diff --git a/sysdeps/mach/hurd/htl/pt-mutex-init.c b/sysdeps/mach/hurd/htl/pt-mutex-init.c index 6b804116a5..7a2cc462f3 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex-init.c +++ b/sysdeps/mach/hurd/htl/pt-mutex-init.c @@ -32,7 +32,7 @@ static const pthread_mutexattr_t dfl_attr = { }; int -_pthread_mutex_init (pthread_mutex_t *mtxp, const pthread_mutexattr_t *attrp) +__pthread_mutex_init (pthread_mutex_t *mtxp, const pthread_mutexattr_t *attrp) { ASSERT_TYPE_SIZE (pthread_mutex_t, __SIZEOF_PTHREAD_MUTEX_T); @@ -55,5 +55,5 @@ _pthread_mutex_init (pthread_mutex_t *mtxp, const pthread_mutexattr_t *attrp) return 0; } -strong_alias (_pthread_mutex_init, pthread_mutex_init) -hidden_def (_pthread_mutex_init) +strong_alias (__pthread_mutex_init, pthread_mutex_init) +hidden_def (__pthread_mutex_init) diff --git a/sysdeps/mach/hurd/i386/libpthread.abilist b/sysdeps/mach/hurd/i386/libpthread.abilist index 0ede90859c..cda8755960 100644 --- a/sysdeps/mach/hurd/i386/libpthread.abilist +++ b/sysdeps/mach/hurd/i386/libpthread.abilist @@ -14,8 +14,6 @@ GLIBC_2.12 _cthread_init_routine D 0x4 GLIBC_2.12 _cthreads_flockfile F GLIBC_2.12 _cthreads_ftrylockfile F GLIBC_2.12 _cthreads_funlockfile F -GLIBC_2.12 _pthread_mutex_destroy F -GLIBC_2.12 _pthread_mutex_init F GLIBC_2.12 _pthread_mutex_lock F GLIBC_2.12 _pthread_mutex_trylock F GLIBC_2.12 _pthread_mutex_unlock F