From patchwork Fri Sep 22 20:26:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 114089 Delivered-To: patch@linaro.org Received: by 10.80.163.150 with SMTP id s22csp3473508edb; Fri, 22 Sep 2017 13:27:26 -0700 (PDT) X-Received: by 10.84.240.196 with SMTP id l4mr264107plt.261.1506112046699; Fri, 22 Sep 2017 13:27:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506112046; cv=none; d=google.com; s=arc-20160816; b=tisEMCXtWep+cUmntBTdHfSBlIl9pGjH20nShflPtsBc8LTe2KBk/lCc1pHkCQVkJU 3b2OUjdL6r6+LjqQpL/N8MUYa5ZzKhJC0QW1jOgk8PwqAAXnyU5tQwIxw5pPO8uMsQYp bLMLTPcpIK5AuhkL6Jum7ZV6xkOungI7ZWKeg87hDoWq2XOYEQO7wTTxmMiiXXrRIpCf /DU4Kszwx2Pk0qwQkhnLYFTx9180QGJfka4P7cBVyuf/KGSawSeUCYp6SGYE8huPyq8Z KMeTSzj5ZE2+hmru87Tr1XV975UvJwD615/2/DDu+aE5qS2IfdExfwgLV2ziRlp26Dqi ceAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:to:from:delivered-to:sender:list-help :list-post:list-archive:list-subscribe:list-unsubscribe:list-id :precedence:mailing-list:dkim-signature:domainkey-signature :arc-authentication-results; bh=1ayk+0h8HBhQljfBzesv+Opydv/lxSO9Q+lOYsVxWe8=; b=j9ZvR2v2WS46x0BSTz/hPFYAXGoDju+wfrSsQRLXquYYOC4yKjCobsiyimoond4W23 7fDJYnghfI0ccpQAgiw1ZLuvFPFurqCS57NRX1yO3dHM1gIRkUcKoZNtCiReOYWqGwHP knbbev0nGtZbpVnG7V2Dow0j53MDQRTRRjc5QXRg8B/kq5obVQWKXJTuMbvOwSTQKmln SK7YZeGS0YH8oCfU2bB0dd7DJZftAEhQRy5Mfri/+/N+74gy18Xmvla6pC/OWs1YADEb tYfqwmruAqjw2KHsbgnAj24NuXvKe4Q/FIY7ILqGmKRVLxjNZL+iL5g1P7RzZaGcYPs+ Eb7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=vWB1l+1g; spf=pass (google.com: domain of libc-alpha-return-84873-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-84873-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id s17si337372pfk.277.2017.09.22.13.27.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Sep 2017 13:27:26 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-84873-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=vWB1l+1g; spf=pass (google.com: domain of libc-alpha-return-84873-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-84873-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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:subject:date:message-id; q=dns; s= default; b=abSDpAnmpst5mcOFh/YxRGfxUfucy9e+bg9vxmEyhlTzGK0RZW2S0 KLGCJrY25T6IAKITp0ZwroelNILENRZBeagxs4/xy3YwdNQiP5WOPxEi5Hzyo/+O xvk6OlHC7oxBWoF0PPW/wBVmDt8Xiiad9mU0Q+sTQN0I9eHvxzeFCM= 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:subject:date:message-id; s=default; bh=ra8fNB2+qtPX9zSQCQbGrax6kOM=; b=vWB1l+1gxOsWcL5XM6VUqLwgZemc eBxa5c1oPJAvB4zQOvXywyAkBh3Z1msop8ciaEyM8LgfW6NbK0/yKdeILjm+fxQJ ZFs9X4BAi2Pdh3Hsho9O8A3SLyeZMT/jm1jfdlY/4QzyIU6hWdLSqxEqQmHvYUq+ jHSFsBgKlgE8J+M= Received: (qmail 65408 invoked by alias); 22 Sep 2017 20:27:15 -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 65398 invoked by uid 89); 22 Sep 2017 20:27:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.4 required=5.0 tests=BAYES_00, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=torres, Torres X-HELO: mail-qt0-f175.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=1ayk+0h8HBhQljfBzesv+Opydv/lxSO9Q+lOYsVxWe8=; b=VzbtJ0xQGFDxwJGYdP7tLRP7fjopKIV+GJ5ZPexoD+7jatX9JZhdWTN8J2nEr005sm TUt60McY7xu8YJx/AdnoqhSmzJN5UDi1aGPJixkBtHlc5XKcEXkMlKsNyXo4rg8P3ffE Ol4iIJuhQyExWGaynwKevT7pqxkTqnO1aX3Rzs+0bQM6yGRYktFD+bW6UO4HM5oasCku WPcFR63piGf5cC+vASoUhEo7RGpLVMgXBgeVvilOi5GiuuxJ+pV0bK48aUmuMzHoECX5 CATaZF41l9l8Z5pRzTHSpWlwDIeuVUbNdaGJEH7jlq77aX4GnJ8LyQ6Bmwk8OjBtPg0q d3Jg== X-Gm-Message-State: AHPjjUjerOpPJGkVmseVQNfu73vmCFPxPJHWBOYgdbDbvMLSG1tZ8pLI MT1IidH3FSjGrjTxqwPVzB7/1iLjExM= X-Google-Smtp-Source: AOwi7QCqVYXmBAUlLk6dxCCKH63573Ykod/O0QUPofJVn8PKKUyHqVVft1dnD5Oxjha8UI9wqJt1TA== X-Received: by 10.200.47.173 with SMTP id l42mr620389qta.298.1506112031535; Fri, 22 Sep 2017 13:27:11 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH v7 0/8] Add support for ISO C threads.h Date: Fri, 22 Sep 2017 17:26:56 -0300 Message-Id: <1506112024-22601-1-git-send-email-adhemerval.zanella@linaro.org> This is a new update for C11 threads support based on my previous [1] version. The main changes from previous version are: - From discussion in last Cauldron, mtx_t and cnd_t are no longer based on internal pthread types (__pthread_{mutex,cond}_s. It is mainly to avoid the user to direct access the types internal fields in a way not expected by API. - Add static asserts for size and alignment for all required types as an additional consistency check. - Fix some ChangeLog references for 2.27 version. I tested this without regression with a full make/check on x86_64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu, powerpc-linux-gnu, aarch64-linux-gnu, arm-linux-gnueabihf, sparc64-linux-gnu, and sparcv9-linux-gnu. [1] https://sourceware.org/ml/libc-alpha/2017-06/msg01413.html Adhemerval Zanella (7): nptl: Add C11 threads thrd_* functions nptl: Add C11 threads mtx_* functions nptl: Add C11 threads call_once functions nptl: Add C11 threads cnd_* functions nptl: Add C11 threads tss_* functions nptl: Add abilist symbols for C11 threads nptl: Add test cases for ISO C11 threads Juan Manuel Torres Palma (1): Add manual documentation for threads.h ChangeLog | 174 ++++++++++ conform/Makefile | 7 +- conform/data/threads.h-data | 57 ++++ include/stdc-predef.h | 3 - manual/Makefile | 2 +- manual/isothreads.texi | 355 +++++++++++++++++++++ nptl/Makefile | 15 +- nptl/Versions | 9 + nptl/call_once.c | 33 ++ nptl/cnd_broadcast.c | 28 ++ nptl/cnd_destroy.c | 28 ++ nptl/cnd_init.c | 33 ++ nptl/cnd_signal.c | 28 ++ nptl/cnd_timedwait.c | 31 ++ nptl/cnd_wait.c | 28 ++ nptl/descr.h | 2 + nptl/mtx_destroy.c | 27 ++ nptl/mtx_init.c | 54 ++++ nptl/mtx_lock.c | 28 ++ nptl/mtx_timedlock.c | 31 ++ nptl/mtx_trylock.c | 29 ++ nptl/mtx_unlock.c | 28 ++ nptl/pthreadP.h | 3 + nptl/pthread_create.c | 18 +- nptl/thrd_create.c | 32 ++ nptl/thrd_current.c | 26 ++ nptl/thrd_detach.c | 30 ++ nptl/thrd_equal.c | 26 ++ nptl/thrd_exit.c | 27 ++ nptl/thrd_join.c | 32 ++ nptl/thrd_priv.h | 46 +++ nptl/thrd_sleep.c | 41 +++ nptl/thrd_yield.c | 29 ++ nptl/tss_create.c | 31 ++ nptl/tss_delete.c | 27 ++ nptl/tss_get.c | 27 ++ nptl/tss_set.c | 28 ++ nptl/tst-call-once.c | 66 ++++ nptl/tst-cnd-basic.c | 68 ++++ nptl/tst-cnd-broadcast.c | 83 +++++ nptl/tst-cnd-timedwait.c | 70 ++++ nptl/tst-mtx-basic.c | 73 +++++ nptl/tst-mtx-recursive.c | 45 +++ nptl/tst-mtx-timedlock.c | 98 ++++++ nptl/tst-mtx-trylock.c | 90 ++++++ nptl/tst-thrd-detach.c | 52 +++ nptl/tst-thrd-sleep.c | 51 +++ nptl/tst-tss-basic.c | 75 +++++ sysdeps/nptl/threads.h | 198 ++++++++++++ sysdeps/unix/sysv/linux/aarch64/libpthread.abilist | 26 ++ sysdeps/unix/sysv/linux/alpha/libpthread.abilist | 26 ++ sysdeps/unix/sysv/linux/arm/libpthread.abilist | 26 ++ sysdeps/unix/sysv/linux/hppa/libpthread.abilist | 26 ++ sysdeps/unix/sysv/linux/i386/libpthread.abilist | 26 ++ sysdeps/unix/sysv/linux/ia64/libpthread.abilist | 26 ++ .../sysv/linux/m68k/coldfire/libpthread.abilist | 26 ++ .../unix/sysv/linux/m68k/m680x0/libpthread.abilist | 26 ++ .../unix/sysv/linux/microblaze/libpthread.abilist | 26 ++ .../unix/sysv/linux/mips/mips32/libpthread.abilist | 26 ++ .../unix/sysv/linux/mips/mips64/libpthread.abilist | 26 ++ sysdeps/unix/sysv/linux/nios2/libpthread.abilist | 26 ++ .../linux/powerpc/powerpc32/libpthread.abilist | 26 ++ .../linux/powerpc/powerpc64/libpthread-le.abilist | 26 ++ .../linux/powerpc/powerpc64/libpthread.abilist | 26 ++ .../sysv/linux/s390/s390-32/libpthread.abilist | 26 ++ .../sysv/linux/s390/s390-64/libpthread.abilist | 26 ++ sysdeps/unix/sysv/linux/sh/libpthread.abilist | 26 ++ .../sysv/linux/sparc/sparc32/libpthread.abilist | 26 ++ .../sysv/linux/sparc/sparc64/libpthread.abilist | 26 ++ .../linux/tile/tilegx/tilegx32/libpthread.abilist | 26 ++ .../linux/tile/tilegx/tilegx64/libpthread.abilist | 26 ++ .../sysv/linux/tile/tilepro/libpthread.abilist | 26 ++ .../unix/sysv/linux/x86_64/64/libpthread.abilist | 26 ++ .../unix/sysv/linux/x86_64/x32/libpthread.abilist | 26 ++ 74 files changed, 3060 insertions(+), 12 deletions(-) create mode 100644 conform/data/threads.h-data create mode 100644 manual/isothreads.texi create mode 100644 nptl/call_once.c create mode 100644 nptl/cnd_broadcast.c create mode 100644 nptl/cnd_destroy.c create mode 100644 nptl/cnd_init.c create mode 100644 nptl/cnd_signal.c create mode 100644 nptl/cnd_timedwait.c create mode 100644 nptl/cnd_wait.c create mode 100644 nptl/mtx_destroy.c create mode 100644 nptl/mtx_init.c create mode 100644 nptl/mtx_lock.c create mode 100644 nptl/mtx_timedlock.c create mode 100644 nptl/mtx_trylock.c create mode 100644 nptl/mtx_unlock.c create mode 100644 nptl/thrd_create.c create mode 100644 nptl/thrd_current.c create mode 100644 nptl/thrd_detach.c create mode 100644 nptl/thrd_equal.c create mode 100644 nptl/thrd_exit.c create mode 100644 nptl/thrd_join.c create mode 100644 nptl/thrd_priv.h create mode 100644 nptl/thrd_sleep.c create mode 100644 nptl/thrd_yield.c create mode 100644 nptl/tss_create.c create mode 100644 nptl/tss_delete.c create mode 100644 nptl/tss_get.c create mode 100644 nptl/tss_set.c create mode 100644 nptl/tst-call-once.c create mode 100644 nptl/tst-cnd-basic.c create mode 100644 nptl/tst-cnd-broadcast.c create mode 100644 nptl/tst-cnd-timedwait.c create mode 100644 nptl/tst-mtx-basic.c create mode 100644 nptl/tst-mtx-recursive.c create mode 100644 nptl/tst-mtx-timedlock.c create mode 100644 nptl/tst-mtx-trylock.c create mode 100644 nptl/tst-thrd-detach.c create mode 100644 nptl/tst-thrd-sleep.c create mode 100644 nptl/tst-tss-basic.c create mode 100644 sysdeps/nptl/threads.h -- 2.7.4