From patchwork Sun Jan 12 23:52:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 1221904 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-108624-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=XTUxULbQ; 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 47wtnG3Kckz9s29 for ; Mon, 13 Jan 2020 10:52:33 +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 :mime-version:content-transfer-encoding; q=dns; s=default; b=P0T eO8iEivgmqIKiOFJ23lwBV1xVD7tKQvAbxY77nri1+G8ebESXU97JHsUmWNtpmuK cOQAwy4JgZKkGJBFiEANQec2a6x5PPhgYyL4qrkqg7uJyfyKee21UxRgbA5irNcc ndLfaKR3aV+duYrEPdHnAP3Yyf1v6Y9sRbVoQ4Bk= 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 :mime-version:content-transfer-encoding; s=default; bh=h/3hgfZhi KcKQZZKOYbv3VuBjb8=; b=XTUxULbQOR++/QWnVffJ8ZbgaAolVOIf10oEAIk5n VGud9aSlBpDHG4OIzBCZ50Kf4aL5sb9kJ1bGIw/xxR3oZ717BJ/IVw6+hlgq196z vOpEdpPHwS+inUMEM3ZfPxK+ZcB/kR9mwbmzu/nsm0W36a3Thp+0IoOFIQZg53tB /I= Received: (qmail 84144 invoked by alias); 12 Jan 2020 23:52:27 -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 84136 invoked by uid 89); 12 Jan 2020 23:52:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-22.9 required=5.0 tests=AWL, 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 , commit-hurd@gnu.org Subject: [hurd, commited] htl: Add internal versions of functions used by C11 threads Date: Mon, 13 Jan 2020 00:52:21 +0100 Message-Id: <20200112235221.687231-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 The C11 threads implementation needs to call pthread_join and pthread_key_delete without exposing them. --- htl/pt-join.c | 3 ++- sysdeps/htl/libc-lockP.h | 2 ++ sysdeps/htl/pt-key-delete.c | 3 ++- sysdeps/htl/pthreadP.h | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/htl/pt-join.c b/htl/pt-join.c index 158c328af1..b141c4c8b9 100644 --- a/htl/pt-join.c +++ b/htl/pt-join.c @@ -27,7 +27,7 @@ /* Make calling thread wait for termination of thread THREAD. Return the exit status of the thread in *STATUS. */ int -pthread_join (pthread_t thread, void **status) +__pthread_join (pthread_t thread, void **status) { struct __pthread *pthread; int err = 0; @@ -75,3 +75,4 @@ pthread_join (pthread_t thread, void **status) return err; } +strong_alias (__pthread_join, pthread_join); diff --git a/sysdeps/htl/libc-lockP.h b/sysdeps/htl/libc-lockP.h index 4b035021c9..4ba3930a13 100644 --- a/sysdeps/htl/libc-lockP.h +++ b/sysdeps/htl/libc-lockP.h @@ -112,6 +112,8 @@ extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock); extern int __pthread_key_create (pthread_key_t *__key, void (*__destr_function) (void *)); +extern int __pthread_key_delete (pthread_key_t __key); + extern int __pthread_setspecific (pthread_key_t __key, const void *__pointer); diff --git a/sysdeps/htl/pt-key-delete.c b/sysdeps/htl/pt-key-delete.c index 9b3fd9078d..2f8aae16a5 100644 --- a/sysdeps/htl/pt-key-delete.c +++ b/sysdeps/htl/pt-key-delete.c @@ -21,7 +21,7 @@ #include int -pthread_key_delete (pthread_key_t key) +__pthread_key_delete (pthread_key_t key) { error_t err = 0; @@ -61,3 +61,4 @@ pthread_key_delete (pthread_key_t key) return err; } +strong_alias (__pthread_key_delete, pthread_key_delete) diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index 47fd3af87a..30e074c1d0 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -45,6 +45,7 @@ int __pthread_create (pthread_t *newthread, void __cthread_detach (__cthread_t); int __pthread_detach (pthread_t __threadp); void __pthread_exit (void *value) __attribute__ ((__noreturn__)); +int __pthread_join (pthread_t, void **); int __cthread_keycreate (__cthread_key_t *); int __cthread_getspecific (__cthread_key_t, void **); int __cthread_setspecific (__cthread_key_t, void *);