From patchwork Tue Jan 14 18:52:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 1222997 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-108664-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=yoJakQzg; 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 47y03T39WSz9s4Y for ; Wed, 15 Jan 2020 05:53:41 +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=ouI z5hAZGIh2Xp0izqXa4itx3rp2lB28yN4Hayu8tLGezdBYMQAG3uZCHxV1nB4PtsF iXjIRD4Hi7TVriDo1PUxLfcK3ejLCQ0egsrXJXN5J52kVP8o4j40o0qdYHN/To6u 72vdqCdihlCvkBq36YCnItwbLps37Wgdv8XHkmpo= 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=Uz0g54R7G VqvS4r8UuSz85NYSOU=; b=yoJakQzgB5Ds9jfQ/QB9pAPMlrexrPs07G0LrSz1I GTq3sd2Pm7a5OFcM4KZnRjZO95Eh2kkCb4qdL13TTwDXhsuIUXmH24tknOVwGx3w 9LeVTZDUpRmnRPlYig2tZBcCtxJLYEkPZwA1uw5eg+ke5LU/GBIUY/ZIcHxe0LKC Sw= Received: (qmail 91883 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 91809 invoked by uid 89); 14 Jan 2020 18:53:16 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.1 required=5.0 tests=BAYES_00, 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 00/10] Port C11 threads to GNU/Hurd Date: Tue, 14 Jan 2020 19:52:44 +0100 Message-Id: <20200114185255.25813-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 Hello, This patch series basiscally moves the C11 threads implementation to sysdeps/pthread, thus making it available on GNU/Hurd as well. There are a few changes that are needed, I'm here proposing them for review, so we can probably commit them early in the 2.32 development. Samuel Samuel Thibault (10): htl: Rename _pthread_mutex_init/destroy to __pthread_mutex_init/destroy htl: Add missing internal functions declarations htl: Add support for C11 threads behavior htl: Make __PTHREAD_ONCE_INIT more flexible nptl: Move nptl-specific types to separate header C11 threads: do not require PTHREAD_DESTRUCTOR_ITERATIONS C11 threads: Fix thrd_t / pthread_t compatibility assertion C11 threads: make thrd_join more portable htl: Add C11 threads types definitions C11 threads: Move implementation to sysdeps/pthread htl/Versions | 18 ++++++ htl/pt-create.c | 20 +++++- htl/pt-initialize.c | 4 +- htl/pt-internal.h | 3 + nptl/Makefile | 14 +---- sysdeps/htl/bits/thread-shared-types.h | 13 ++++ .../htl/bits/types/struct___pthread_once.h | 2 +- sysdeps/htl/pt-key.h | 2 +- sysdeps/htl/pt-mutex-destroy.c | 5 +- sysdeps/htl/pt-mutex-init.c | 4 +- sysdeps/htl/pt-mutex-timedlock.c | 1 + sysdeps/htl/pthread.h | 2 +- sysdeps/htl/pthreadP.h | 23 ++++++- sysdeps/htl/thrd_current.c | 31 +++++++++ sysdeps/htl/threads.h | 1 - sysdeps/hurd/stdc-predef.h | 63 ------------------- sysdeps/mach/htl/thrd_yield.c | 26 ++++++++ sysdeps/mach/hurd/htl/pt-mutex-destroy.c | 5 +- sysdeps/mach/hurd/htl/pt-mutex-init.c | 6 +- sysdeps/mach/hurd/htl/pt-mutex-timedlock.c | 1 + sysdeps/mach/hurd/i386/libc.abilist | 4 ++ sysdeps/mach/hurd/i386/libpthread.abilist | 23 ++++++- sysdeps/nptl/bits/thread-shared-types.h | 10 +++ sysdeps/nptl/thrd_create.c | 2 + sysdeps/pthread/Makefile | 18 ++++++ {nptl => sysdeps/pthread}/call_once.c | 2 +- {nptl => sysdeps/pthread}/cnd_broadcast.c | 0 {nptl => sysdeps/pthread}/cnd_destroy.c | 0 {nptl => sysdeps/pthread}/cnd_init.c | 0 {nptl => sysdeps/pthread}/cnd_signal.c | 0 {nptl => sysdeps/pthread}/cnd_timedwait.c | 0 {nptl => sysdeps/pthread}/cnd_wait.c | 0 {nptl => sysdeps/pthread}/mtx_destroy.c | 0 {nptl => sysdeps/pthread}/mtx_init.c | 0 {nptl => sysdeps/pthread}/mtx_lock.c | 0 {nptl => sysdeps/pthread}/mtx_timedlock.c | 0 {nptl => sysdeps/pthread}/mtx_trylock.c | 0 {nptl => sysdeps/pthread}/mtx_unlock.c | 0 {nptl => sysdeps/pthread}/thrd_create.c | 8 +-- {nptl => sysdeps/pthread}/thrd_detach.c | 0 {nptl => sysdeps/pthread}/thrd_equal.c | 0 {nptl => sysdeps/pthread}/thrd_exit.c | 0 {nptl => sysdeps/pthread}/thrd_join.c | 2 +- {nptl => sysdeps/pthread}/thrd_priv.h | 0 {nptl => sysdeps/pthread}/thrd_sleep.c | 0 sysdeps/{nptl => pthread}/threads.h | 13 ++-- {nptl => sysdeps/pthread}/tss_create.c | 2 + {nptl => sysdeps/pthread}/tss_delete.c | 0 {nptl => sysdeps/pthread}/tss_get.c | 0 {nptl => sysdeps/pthread}/tss_set.c | 0 {nptl => sysdeps/pthread}/tst-call-once.c | 0 {nptl => sysdeps/pthread}/tst-cnd-basic.c | 0 {nptl => sysdeps/pthread}/tst-cnd-broadcast.c | 0 {nptl => sysdeps/pthread}/tst-cnd-timedwait.c | 0 {nptl => sysdeps/pthread}/tst-mtx-basic.c | 0 {nptl => sysdeps/pthread}/tst-mtx-recursive.c | 0 {nptl => sysdeps/pthread}/tst-mtx-timedlock.c | 0 {nptl => sysdeps/pthread}/tst-mtx-trylock.c | 0 {nptl => sysdeps/pthread}/tst-thrd-detach.c | 0 {nptl => sysdeps/pthread}/tst-thrd-sleep.c | 0 {nptl => sysdeps/pthread}/tst-tss-basic.c | 0 61 files changed, 220 insertions(+), 108 deletions(-) create mode 100644 sysdeps/htl/thrd_current.c delete mode 100644 sysdeps/htl/threads.h delete mode 100644 sysdeps/hurd/stdc-predef.h create mode 100644 sysdeps/mach/htl/thrd_yield.c create mode 100644 sysdeps/nptl/thrd_create.c rename {nptl => sysdeps/pthread}/call_once.c (95%) rename {nptl => sysdeps/pthread}/cnd_broadcast.c (100%) rename {nptl => sysdeps/pthread}/cnd_destroy.c (100%) rename {nptl => sysdeps/pthread}/cnd_init.c (100%) rename {nptl => sysdeps/pthread}/cnd_signal.c (100%) rename {nptl => sysdeps/pthread}/cnd_timedwait.c (100%) rename {nptl => sysdeps/pthread}/cnd_wait.c (100%) rename {nptl => sysdeps/pthread}/mtx_destroy.c (100%) rename {nptl => sysdeps/pthread}/mtx_init.c (100%) rename {nptl => sysdeps/pthread}/mtx_lock.c (100%) rename {nptl => sysdeps/pthread}/mtx_timedlock.c (100%) rename {nptl => sysdeps/pthread}/mtx_trylock.c (100%) rename {nptl => sysdeps/pthread}/mtx_unlock.c (100%) rename {nptl => sysdeps/pthread}/thrd_create.c (82%) rename {nptl => sysdeps/pthread}/thrd_detach.c (100%) rename {nptl => sysdeps/pthread}/thrd_equal.c (100%) rename {nptl => sysdeps/pthread}/thrd_exit.c (100%) rename {nptl => sysdeps/pthread}/thrd_join.c (92%) rename {nptl => sysdeps/pthread}/thrd_priv.h (100%) rename {nptl => sysdeps/pthread}/thrd_sleep.c (100%) rename sysdeps/{nptl => pthread}/threads.h (97%) rename {nptl => sysdeps/pthread}/tss_create.c (96%) rename {nptl => sysdeps/pthread}/tss_delete.c (100%) rename {nptl => sysdeps/pthread}/tss_get.c (100%) rename {nptl => sysdeps/pthread}/tss_set.c (100%) rename {nptl => sysdeps/pthread}/tst-call-once.c (100%) rename {nptl => sysdeps/pthread}/tst-cnd-basic.c (100%) rename {nptl => sysdeps/pthread}/tst-cnd-broadcast.c (100%) rename {nptl => sysdeps/pthread}/tst-cnd-timedwait.c (100%) rename {nptl => sysdeps/pthread}/tst-mtx-basic.c (100%) rename {nptl => sysdeps/pthread}/tst-mtx-recursive.c (100%) rename {nptl => sysdeps/pthread}/tst-mtx-timedlock.c (100%) rename {nptl => sysdeps/pthread}/tst-mtx-trylock.c (100%) rename {nptl => sysdeps/pthread}/tst-thrd-detach.c (100%) rename {nptl => sysdeps/pthread}/tst-thrd-sleep.c (100%) rename {nptl => sysdeps/pthread}/tst-tss-basic.c (100%)