From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.1 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 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 dcvr.yhbt.net (Postfix) with ESMTPS id F34C51F466 for ; Tue, 14 Jan 2020 18:54:04 +0000 (UTC) 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=leQYNos+4Oy5zNAFYGa78p3NkR6Bh7avtW/VDhzb5OeYtGcMFWQqk sZkTpA5BocTSkSPFrv0d3C3uOhgxpFUwtHLEjb+dtVFIwTDmZktxXJwtQPT9kX+G Ea6tEGph88Jd69Prp7P2q5xlvUQx41vTf+NCZFYyPyXheegHm/7t2Q= 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=cJPp9N2gJWzPMAl+mnNJt8MSZWw=; b=DJaT9apRxo3ZRuEGpaPx0Y8V+eiA RL5Bo9hHuoDIwWtsyzWao44Jni8KpKoOa1fSD+dCBJUwOtMyNLN7mOCkCMeYpj4E yZlfClMCoYY5g3IxqgOU0w6RjfJ+YPsAxieWwDQteFP4ojKOcavyu++w4yPmfxXM WOvX4j5tSwESDbs= Received: (qmail 93583 invoked by alias); 14 Jan 2020 18:53:29 -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 Received: (qmail 93476 invoked by uid 89); 14 Jan 2020 18:53:29 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault , commit-hurd@gnu.org Subject: [hurd,commited] htl: Add internal version of __pthread_mutex_timedlock Date: Tue, 14 Jan 2020 19:52:45 +0100 Message-Id: <20200114185255.25813-2-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 Content-Transfer-Encoding: 8bit The C11 threads implementation will need it. --- htl/Versions | 1 + sysdeps/htl/pt-mutex-timedlock.c | 3 ++- sysdeps/htl/pthreadP.h | 2 ++ sysdeps/mach/hurd/htl/pt-mutex-timedlock.c | 3 ++- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/htl/Versions b/htl/Versions index 1c306acf5c..77f7335b9c 100644 --- a/htl/Versions +++ b/htl/Versions @@ -155,5 +155,6 @@ libpthread { __pthread_setspecific; __pthread_getattr_np; __pthread_attr_getstack; + __pthread_mutex_timedlock; } } diff --git a/sysdeps/htl/pt-mutex-timedlock.c b/sysdeps/htl/pt-mutex-timedlock.c index d0ebb2975e..0e50f38ef2 100644 --- a/sysdeps/htl/pt-mutex-timedlock.c +++ b/sysdeps/htl/pt-mutex-timedlock.c @@ -189,8 +189,9 @@ __pthread_mutex_timedlock_internal (struct __pthread_mutex *mutex, } int -pthread_mutex_timedlock (struct __pthread_mutex *mutex, +__pthread_mutex_timedlock (struct __pthread_mutex *mutex, const struct timespec *abstime) { return __pthread_mutex_timedlock_internal (mutex, abstime); } +strong_alias (__pthread_mutex_timedlock, pthread_mutex_timedlock) diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index af0154538a..affe7cdf53 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -29,6 +29,8 @@ extern struct __pthread **__pthread_threads; extern int _pthread_mutex_init (pthread_mutex_t *mutex, const pthread_mutexattr_t *attr); extern int __pthread_mutex_lock (pthread_mutex_t *__mutex); +extern int __pthread_mutex_timedlock (pthread_mutex_t *__mutex, + const struct timespec *__abstime); extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex); extern int __pthread_cond_broadcast (pthread_cond_t *cond); diff --git a/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c b/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c index 13136ddfe1..e83bc57875 100644 --- a/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c +++ b/sysdeps/mach/hurd/htl/pt-mutex-timedlock.c @@ -24,7 +24,7 @@ #include int -pthread_mutex_timedlock (pthread_mutex_t *mtxp, const struct timespec *tsp) +__pthread_mutex_timedlock (pthread_mutex_t *mtxp, const struct timespec *tsp) { struct __pthread *self; int ret, flags = mtxp->__flags & GSYNC_SHARED; @@ -76,3 +76,4 @@ pthread_mutex_timedlock (pthread_mutex_t *mtxp, const struct timespec *tsp) return ret; } +strong_alias (__pthread_mutex_timedlock, pthread_mutex_timedlock) -- 2.24.1