From patchwork Tue Jul 13 21:37:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 44340 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D005E3937422 for ; Tue, 13 Jul 2021 21:37:48 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from hera.aquilenet.fr (hera.aquilenet.fr [185.233.100.1]) by sourceware.org (Postfix) with ESMTPS id C2332385781D for ; Tue, 13 Jul 2021 21:37:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C2332385781D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=ens-lyon.org Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 2E300254; Tue, 13 Jul 2021 23:37:32 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wTqmSJf-ZRna; Tue, 13 Jul 2021 23:37:31 +0200 (CEST) Received: from begin (unknown [IPv6:2a01:cb19:956:1b00:de41:a9ff:fe47:ec49]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 45BD594; Tue, 13 Jul 2021 23:37:31 +0200 (CEST) Received: from samy by begin with local (Exim 4.94.2) (envelope-from ) id 1m3Q5p-00EVD2-Pe; Tue, 13 Jul 2021 23:37:29 +0200 From: Samuel Thibault To: libc-alpha@sourceware.org Subject: [hurd,commited] htl: Let libc call __pthread_mutex_{,try,un}lock Date: Tue, 13 Jul 2021 23:37:29 +0200 Message-Id: <20210713213729.3456489-1-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spamd-Bar: ++++ X-Rspamd-Server: hera Authentication-Results: hera.aquilenet.fr X-Rspamd-Queue-Id: 2E300254 X-Spamd-Result: default: False [4.37 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_MISSING_CHARSET(2.50)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCVD_COUNT_THREE(0.00)[3]; MID_CONTAINS_FROM(1.00)[]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; BAYES_HAM(-0.63)[82.35%] X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: commit-hurd@gnu.org Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" Now that NPTL was moved to libc, libc makes internal __pthread calls, so htl has to expose them internally. --- htl/Versions | 1 + sysdeps/htl/pthreadP.h | 3 +++ sysdeps/mach/hurd/htl/pt-mutex-lock.c | 1 + sysdeps/mach/hurd/htl/pt-mutex-trylock.c | 1 + sysdeps/mach/hurd/htl/pt-mutex-unlock.c | 1 + 5 files changed, 7 insertions(+) diff --git a/htl/Versions b/htl/Versions index 9506043c62..4aea321016 100644 --- a/htl/Versions +++ b/htl/Versions @@ -187,6 +187,7 @@ libpthread { __pthread_enable_asynccancel; __pthread_disable_asynccancel; + __pthread_mutex_lock; __pthread_mutex_trylock; __pthread_mutex_unlock; _pthread_mutex_lock; _pthread_mutex_trylock; _pthread_mutex_unlock; _pthread_rwlock_destroy; _pthread_rwlock_init; } diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index 3b357b7bdc..7b3f969a3b 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -36,10 +36,13 @@ extern struct __pthread **__pthread_threads; 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); +hidden_proto (__pthread_mutex_lock) extern int __pthread_mutex_trylock (pthread_mutex_t *_mutex); +hidden_proto (__pthread_mutex_trylock) extern int __pthread_mutex_timedlock (pthread_mutex_t *__mutex, const struct timespec *__abstime); extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex); +hidden_proto (__pthread_mutex_unlock) extern int __pthread_mutexattr_init (pthread_mutexattr_t *attr); extern int __pthread_mutexattr_settype (pthread_mutexattr_t *attr, int kind); diff --git a/sysdeps/mach/hurd/htl/pt-mutex-lock.c b/sysdeps/mach/hurd/htl/pt-mutex-lock.c index e32066b777..5214489533 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex-lock.c +++ b/sysdeps/mach/hurd/htl/pt-mutex-lock.c @@ -76,5 +76,6 @@ __pthread_mutex_lock (pthread_mutex_t *mtxp) return ret; } +hidden_def (__pthread_mutex_lock) strong_alias (__pthread_mutex_lock, _pthread_mutex_lock) weak_alias (__pthread_mutex_lock, pthread_mutex_lock) diff --git a/sysdeps/mach/hurd/htl/pt-mutex-trylock.c b/sysdeps/mach/hurd/htl/pt-mutex-trylock.c index 5aa39ab00c..1be451ac96 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex-trylock.c +++ b/sysdeps/mach/hurd/htl/pt-mutex-trylock.c @@ -80,5 +80,6 @@ __pthread_mutex_trylock (pthread_mutex_t *mtxp) return ret; } +hidden_def (__pthread_mutex_trylock) strong_alias (__pthread_mutex_trylock, _pthread_mutex_trylock) weak_alias (__pthread_mutex_trylock, pthread_mutex_trylock) diff --git a/sysdeps/mach/hurd/htl/pt-mutex-unlock.c b/sysdeps/mach/hurd/htl/pt-mutex-unlock.c index 35fa77d42a..74ae51eb64 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex-unlock.c +++ b/sysdeps/mach/hurd/htl/pt-mutex-unlock.c @@ -87,5 +87,6 @@ __pthread_mutex_unlock (pthread_mutex_t *mtxp) return ret; } +hidden_def (__pthread_mutex_unlock) strong_alias (__pthread_mutex_unlock, _pthread_mutex_unlock) weak_alias (__pthread_mutex_unlock, pthread_mutex_unlock)