From patchwork Mon Feb 10 01:04:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 1235589 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-109344-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=kMpw9MBf; 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 48G7GD0zLjz9sRY for ; Mon, 10 Feb 2020 12:13:55 +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=ffH b2awrLtHOx5HkCdn8VT5vMhB4aj7N/XzXREWyAX/bk7ej6dcQXKa5u6c1544ONuz 2pQutVP+jRhwhcWMsllxtnuL6OVOGxq5zrVa6gMXMYRc7SvE6xHBAWzOVmHEXf47 KhSEgxOEXG5G+WgiBmNg3o/blE4BiPOu+i22eYNc= 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=98ehvn5tn M8G4UU62us7mWyiirI=; b=kMpw9MBfWBkoVqa3pfZ9ugLG7Kpc5eYGmyPcZAbxy TEPODIJvGbAtWr4uG/4MWzlgkaYjA+9nFh06MjvNMHy+BVukwlJ+Jq6sFV9yIYmA DyyiHVjl1Qc3U5nE6Od5IQxRmjhmf7ZDkzpemQtPyH2pZw/cPb/uazSgzJEqntn2 SM= Received: (qmail 114110 invoked by alias); 10 Feb 2020 01:13:42 -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 114087 invoked by uid 89); 10 Feb 2020 01:13:41 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.2 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 01/10] htl: clean __pthread_get_cleanup_stack hidden proto Date: Mon, 10 Feb 2020 02:04:59 +0100 Message-Id: <20200210010508.428251-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 --- htl/pt-cleanup.c | 4 ++-- htl/pt-exit.c | 2 +- htl/pt-join.c | 2 -- sysdeps/htl/pthreadP.h | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/htl/pt-cleanup.c b/htl/pt-cleanup.c index 3f5f43f253..a9a7c95847 100644 --- a/htl/pt-cleanup.c +++ b/htl/pt-cleanup.c @@ -21,8 +21,8 @@ #include struct __pthread_cancelation_handler ** -___pthread_get_cleanup_stack (void) +__pthread_get_cleanup_stack (void) { return &_pthread_self ()->cancelation_handlers; } -strong_alias (___pthread_get_cleanup_stack, __pthread_get_cleanup_stack) +hidden_def(__pthread_get_cleanup_stack) diff --git a/htl/pt-exit.c b/htl/pt-exit.c index 9a4db2da51..94e3cd9dc0 100644 --- a/htl/pt-exit.c +++ b/htl/pt-exit.c @@ -41,7 +41,7 @@ __pthread_exit (void *status) disabled. */ __pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &oldstate); - for (handlers = ___pthread_get_cleanup_stack (); + for (handlers = __pthread_get_cleanup_stack (); *handlers != NULL; *handlers = (*handlers)->__next) (*handlers)->__handler ((*handlers)->__arg); diff --git a/htl/pt-join.c b/htl/pt-join.c index b141c4c8b9..43878a3d52 100644 --- a/htl/pt-join.c +++ b/htl/pt-join.c @@ -22,8 +22,6 @@ #include -#define __pthread_get_cleanup_stack ___pthread_get_cleanup_stack - /* Make calling thread wait for termination of thread THREAD. Return the exit status of the thread in *STATUS. */ int diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index fd1e697e39..7de96120a4 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -84,7 +84,6 @@ int __pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize); int __pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, size_t __stacksize); int __pthread_attr_getstack (const pthread_attr_t *, void **, size_t *); -struct __pthread_cancelation_handler **___pthread_get_cleanup_stack (void) attribute_hidden; #if IS_IN (libpthread) hidden_proto (__pthread_key_create) @@ -93,6 +92,7 @@ hidden_proto (__pthread_setspecific) hidden_proto (__pthread_mutex_init) hidden_proto (__pthread_mutex_destroy) hidden_proto (__pthread_mutex_timedlock) +hidden_proto (__pthread_get_cleanup_stack) #endif #define ASSERT_TYPE_SIZE(type, size) \ From patchwork Mon Feb 10 01:05:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 1235582 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-109337-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=EO1aU2XB; 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 48G74Y1j4Lz9sRR for ; Mon, 10 Feb 2020 12:05: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:in-reply-to :references:mime-version:content-transfer-encoding; q=dns; s= default; b=oOPSHenLw37pDwcgKLgq4J16CEMzMMfiwExKl1T1v3rbcdCmmtJXc /EduPk7ZWX9lH80Zn+lbWmbkQwkAT66CM7EGkLveDFoEY2i0X8g0KTGUGNGUwkcH fqqeCEiNcTBovE9vj9PrBbtu5KtOocw83U8tafRk9iDdmpX/leXKjg= 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=ZXVNPRz6hS2vYiypCVeSrkPCXD0=; b=EO1aU2XBqSCGR2aN0gXjrY2A2XZv 742HjMxPB09+g3Loa13ZRR7bNoClkSKTFeyxAuOYKxYm98ITJmyjoR95rEjjJmn0 Ixteg9uBAuDn6JQZ+nxGqKHKSAacvTeCqXJwR2uUqNeK5UOe/mM7h2RAgqi1il16 ja19gNN1NAcN3U0= Received: (qmail 95871 invoked by alias); 10 Feb 2020 01:05:18 -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 95818 invoked by uid 89); 10 Feb 2020 01:05:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NEUTRAL autolearn=ham version=3.3.1 spammy=H*MI:sk:2020021 X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault , commit-hurd@gnu.org Subject: [hurd, commited 02/10] htl: Add support for libc cancellation points Date: Mon, 10 Feb 2020 02:05:00 +0100 Message-Id: <20200210010508.428251-2-samuel.thibault@ens-lyon.org> In-Reply-To: <20200210010508.428251-1-samuel.thibault@ens-lyon.org> References: <20200210010508.428251-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 --- htl/Makefile | 1 + htl/Versions | 2 ++ htl/cancellation.c | 45 +++++++++++++++++++++++++++++++ htl/pt-testcancel.c | 3 ++- sysdeps/htl/pthreadP.h | 1 + sysdeps/mach/hurd/sysdep-cancel.h | 20 ++++++++++++-- 6 files changed, 69 insertions(+), 3 deletions(-) create mode 100644 htl/cancellation.c diff --git a/htl/Makefile b/htl/Makefile index b2dc797ee4..1b33748934 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -132,6 +132,7 @@ libpthread-routines := pt-attr pt-attr-destroy pt-attr-getdetachstate \ \ shm-directory \ \ + cancellation \ cthreads-compat \ herrno \ $(SYSDEPS) diff --git a/htl/Versions b/htl/Versions index 4f5f727753..1ec6f363d5 100644 --- a/htl/Versions +++ b/htl/Versions @@ -168,6 +168,8 @@ libpthread { __pthread_mutex_init; __pthread_mutex_destroy; __pthread_mutex_timedlock; + __pthread_enable_asynccancel; + __pthread_disable_asynccancel; _pthread_mutex_lock; _pthread_mutex_trylock; _pthread_mutex_unlock; _pthread_rwlock_destroy; _pthread_rwlock_init; diff --git a/htl/cancellation.c b/htl/cancellation.c new file mode 100644 index 0000000000..598f911d91 --- /dev/null +++ b/htl/cancellation.c @@ -0,0 +1,45 @@ +/* Set the cancel type during blocking calls. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +#include +#include + +int __pthread_enable_asynccancel (void) +{ + struct __pthread *p = _pthread_self (); + int oldtype; + + __pthread_mutex_lock (&p->cancel_lock); + oldtype = p->cancel_type; + p->cancel_type = PTHREAD_CANCEL_ASYNCHRONOUS; + __pthread_mutex_unlock (&p->cancel_lock); + + __pthread_testcancel (); + + return oldtype; +} + +void __pthread_disable_asynccancel (int oldtype) +{ + struct __pthread *p = _pthread_self (); + + __pthread_mutex_lock (&p->cancel_lock); + p->cancel_type = oldtype; + __pthread_mutex_unlock (&p->cancel_lock); +} diff --git a/htl/pt-testcancel.c b/htl/pt-testcancel.c index 1ec324b95f..37326280ee 100644 --- a/htl/pt-testcancel.c +++ b/htl/pt-testcancel.c @@ -22,7 +22,7 @@ #include void -pthread_testcancel (void) +__pthread_testcancel (void) { struct __pthread *p = _pthread_self (); int cancelled; @@ -34,3 +34,4 @@ pthread_testcancel (void) if (cancelled) __pthread_exit (PTHREAD_CANCELED); } +strong_alias (__pthread_testcancel, pthread_testcancel) diff --git a/sysdeps/htl/pthreadP.h b/sysdeps/htl/pthreadP.h index 7de96120a4..2bb4baa249 100644 --- a/sysdeps/htl/pthreadP.h +++ b/sysdeps/htl/pthreadP.h @@ -84,6 +84,7 @@ int __pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize); int __pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, size_t __stacksize); int __pthread_attr_getstack (const pthread_attr_t *, void **, size_t *); +void __pthread_testcancel (void); #if IS_IN (libpthread) hidden_proto (__pthread_key_create) diff --git a/sysdeps/mach/hurd/sysdep-cancel.h b/sysdeps/mach/hurd/sysdep-cancel.h index f686a39024..669c17151a 100644 --- a/sysdeps/mach/hurd/sysdep-cancel.h +++ b/sysdeps/mach/hurd/sysdep-cancel.h @@ -1,8 +1,24 @@ #include +int __pthread_enable_asynccancel (void); +void __pthread_disable_asynccancel (int oldtype); + +#pragma weak __pthread_enable_asynccancel +#pragma weak __pthread_disable_asynccancel + /* Always multi-thread (since there's at least the sig handler), but no handling enabled. */ #define SINGLE_THREAD_P (0) #define RTLD_SINGLE_THREAD_P (0) -#define LIBC_CANCEL_ASYNC() 0 /* Just a dummy value. */ -#define LIBC_CANCEL_RESET(val) ((void)(val)) /* Nothing, but evaluate it. */ + +#define LIBC_CANCEL_ASYNC() ({ \ + int __cancel_oldtype = 0; \ + if (__pthread_enable_asynccancel) \ + __cancel_oldtype = __pthread_enable_asynccancel(); \ + __cancel_oldtype; \ +}) + +#define LIBC_CANCEL_RESET(val) do { \ + if (__pthread_disable_asynccancel) \ + __pthread_disable_asynccancel (val); \ +} while (0) From patchwork Mon Feb 10 01:05:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 1235585 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-109340-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=tswwO8pp; 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 48G7572wRDz9sRR for ; Mon, 10 Feb 2020 12:06:03 +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:in-reply-to :references:mime-version:content-transfer-encoding; q=dns; s= default; b=xvl0zFujr9FRkLwyywz/x7Nc+to+IUDqKb+dJkYDMufR+tvkXDDe8 rLHgW+dTAnI1ooBiez8Z0gtX55sYYocbWbmSH1m84b+Yx6uIDWZMonwSU6fprVwe mq4cnL1wDmZH8o9Q4iQZrb7O3zpEvv5+WbtXmHmxbfxW8LGy8cuodw= 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=xSWOtm/bQGIqr5Syg6Enp5+A2/c=; b=tswwO8ppyPhk4errjMsMCmmeLp7s cuFjxh9X9p1+p5oC5sJ0tc1pX/GQj2CUn3MRheQwAgJcsviB0WxWZjBrKFZKv/tp Q+6uE5aFfIAQ8lU+scf2e0KBaJihegs19BciKMfTekVihpzDuTc6G7pVyy7BDyJY EVDlDou33KIV/2c= Received: (qmail 96473 invoked by alias); 10 Feb 2020 01:05:22 -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 96388 invoked by uid 89); 10 Feb 2020 01:05:21 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.0 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 03/10] hurd: Make nanosleep a cancellation point Date: Mon, 10 Feb 2020 02:05:01 +0100 Message-Id: <20200210010508.428251-3-samuel.thibault@ens-lyon.org> In-Reply-To: <20200210010508.428251-1-samuel.thibault@ens-lyon.org> References: <20200210010508.428251-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 --- sysdeps/mach/clock_nanosleep.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sysdeps/mach/clock_nanosleep.c b/sysdeps/mach/clock_nanosleep.c index ae9335cb2b..23ebc15274 100644 --- a/sysdeps/mach/clock_nanosleep.c +++ b/sysdeps/mach/clock_nanosleep.c @@ -22,6 +22,7 @@ #include #include #include +#include static int nanosleep_call (const struct timespec *req, struct timespec *rem) @@ -39,9 +40,13 @@ nanosleep_call (const struct timespec *req, struct timespec *rem) if (rem != NULL) __clock_gettime (CLOCK_REALTIME, &before); + int cancel_oldtype = LIBC_CANCEL_ASYNC(); err = __mach_msg (NULL, MACH_RCV_MSG|MACH_RCV_TIMEOUT|MACH_RCV_INTERRUPT, 0, 0, recv, ms, MACH_PORT_NULL); + LIBC_CANCEL_RESET (cancel_oldtype); + __mach_port_destroy (mach_task_self (), recv); + if (err == EMACH_RCV_INTERRUPTED) { if (rem != NULL) From patchwork Mon Feb 10 01:05:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 1235587 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-109342-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=iQckyvNV; 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 48G75T0Wwdz9sRY for ; Mon, 10 Feb 2020 12:06:20 +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:in-reply-to :references:mime-version:content-transfer-encoding; q=dns; s= default; b=kZkWdp3/hrO6nIUsRa4IZsPbA5//asdYfyqmFYJHjRkgh6ftZarPZ CwrN4Oa5SzNJ6Pd1pqwuT4yGnK/01216pNYILo8E6aUxfO+orj9+N92A/hyON/Qy bBzwXX8N4rLEVMJ1Tdx4pKJ/VKVYaxdWKKv5RddzGZ7DrFAn6uNoC4= 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=sOKEsJFLEk+IJwxYeCrIz9KXtCY=; b=iQckyvNVQY2+gigw2oHIdn73LVzs OWPjJf0yvHJkjALUor4PecY37ngsb21M7dz3+Ct/0g4DeIM7eXoa6dWz4278xBLy IfygrHwZlKLcwtAEFHzFrj8x19+jz8GSuY0xZ54GOytDcQYU5jbUjEHLaDjs/+zg D6YftRiDWrEDXVE= Received: (qmail 96585 invoked by alias); 10 Feb 2020 01:05:22 -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 96404 invoked by uid 89); 10 Feb 2020 01:05:21 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.0 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= X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault , commit-hurd@gnu.org Subject: [hurd, commited 04/10] pthread: Move key tests from nptl to sysdeps/pthread Date: Mon, 10 Feb 2020 02:05:02 +0100 Message-Id: <20200210010508.428251-4-samuel.thibault@ens-lyon.org> In-Reply-To: <20200210010508.428251-1-samuel.thibault@ens-lyon.org> References: <20200210010508.428251-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 So they can be checked with htl too. --- nptl/Makefile | 1 - sysdeps/pthread/Makefile | 1 + {nptl => sysdeps/pthread}/tst-key1.c | 0 {nptl => sysdeps/pthread}/tst-key2.c | 0 {nptl => sysdeps/pthread}/tst-key3.c | 0 {nptl => sysdeps/pthread}/tst-key4.c | 0 6 files changed, 1 insertion(+), 1 deletion(-) rename {nptl => sysdeps/pthread}/tst-key1.c (100%) rename {nptl => sysdeps/pthread}/tst-key2.c (100%) rename {nptl => sysdeps/pthread}/tst-key3.c (100%) rename {nptl => sysdeps/pthread}/tst-key4.c (100%) diff --git a/nptl/Makefile b/nptl/Makefile index 3ad3024a39..8e53ff6a49 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -249,7 +249,6 @@ tests = tst-attr2 tst-attr3 tst-default-attr \ tst-rwlock9 tst-rwlock10 tst-rwlock11 tst-rwlock12 \ tst-rwlock14 tst-rwlock15 tst-rwlock17 tst-rwlock18 \ tst-once5 \ - tst-key1 tst-key2 tst-key3 tst-key4 \ tst-sem1 tst-sem2 tst-sem3 tst-sem4 tst-sem5 tst-sem6 tst-sem7 \ tst-sem8 tst-sem9 tst-sem10 tst-sem14 \ tst-sem15 tst-sem16 tst-sem17 \ diff --git a/sysdeps/pthread/Makefile b/sysdeps/pthread/Makefile index cceaa91837..8143eeb1ad 100644 --- a/sysdeps/pthread/Makefile +++ b/sysdeps/pthread/Makefile @@ -50,6 +50,7 @@ tests += tst-cnd-basic tst-mtx-trylock tst-cnd-broadcast \ tst-cond14 tst-cond15 tst-cond16 tst-cond17 tst-cond18 tst-cond19 \ tst-cond23 tst-cond24 tst-cond25 \ tst-cond-except \ + tst-key1 tst-key2 tst-key3 tst-key4 \ tst-mutex1 tst-mutex2 tst-mutex3 tst-mutex4 tst-mutex6 tst-mutex10 \ tst-once1 tst-once2 tst-once3 tst-once4 \ tst-rwlock1 tst-rwlock4 tst-rwlock5 tst-rwlock13 tst-rwlock16 \ diff --git a/nptl/tst-key1.c b/sysdeps/pthread/tst-key1.c similarity index 100% rename from nptl/tst-key1.c rename to sysdeps/pthread/tst-key1.c diff --git a/nptl/tst-key2.c b/sysdeps/pthread/tst-key2.c similarity index 100% rename from nptl/tst-key2.c rename to sysdeps/pthread/tst-key2.c diff --git a/nptl/tst-key3.c b/sysdeps/pthread/tst-key3.c similarity index 100% rename from nptl/tst-key3.c rename to sysdeps/pthread/tst-key3.c diff --git a/nptl/tst-key4.c b/sysdeps/pthread/tst-key4.c similarity index 100% rename from nptl/tst-key4.c rename to sysdeps/pthread/tst-key4.c From patchwork Mon Feb 10 01:05:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 1235586 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-109341-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=VYLSlwas; 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 48G75J3hFYz9sRR for ; Mon, 10 Feb 2020 12:06:12 +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:in-reply-to :references:mime-version:content-transfer-encoding; q=dns; s= default; b=URM12mKJFUjP4Omx1duZEoXMqD9uBA6iyKGUQuNKHcey2MDfCbA6A KMuyx8qxLDqNXg1i5F1HPA45LdjT/yrdwt8Zs6fMGjaVEpeclu4AD/nfEkZ/4Afr DXn8Fsfh+184ZYFhDAStJAhPkqQN5/3bf/D00QLQGY4++ZaIdi7EhE= 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=ZOeE5sGqykW/vEiKui+sVwblwnw=; b=VYLSlwasELTjexpDjTBvlEs5gPil qonEUxTbcEh5w5hLWhmF2zP7whaPnZ9GWbvxZK0X1kbP2iKRacwMhLvYgDDfYSRG aChdBpo+veMQOCWtz+VEKDPv+59M5fCBRj5rXRRpdNesP9PG7/hkl91ZLdsTjMJW PfWuphnr8LQIU78= Received: (qmail 96530 invoked by alias); 10 Feb 2020 01:05:22 -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 96397 invoked by uid 89); 10 Feb 2020 01:05:21 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.1 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=HX-Languages-Length:1028, 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 05/10] htl: Add support for semaphore maximum value Date: Mon, 10 Feb 2020 02:05:03 +0100 Message-Id: <20200210010508.428251-5-samuel.thibault@ens-lyon.org> In-Reply-To: <20200210010508.428251-1-samuel.thibault@ens-lyon.org> References: <20200210010508.428251-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 --- sysdeps/htl/sem-post.c | 7 +++++++ sysdeps/mach/hurd/bits/local_lim.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/sysdeps/htl/sem-post.c b/sysdeps/htl/sem-post.c index 77f297314e..2e0be8fc49 100644 --- a/sysdeps/htl/sem-post.c +++ b/sysdeps/htl/sem-post.c @@ -30,6 +30,13 @@ __sem_post (sem_t *sem) if (sem->__value > 0) /* Do a quick up. */ { + if (sem->__value == SEM_VALUE_MAX) + { + __pthread_spin_unlock (&sem->__lock); + errno = EOVERFLOW; + return -1; + } + assert (sem->__queue == NULL); sem->__value++; __pthread_spin_unlock (&sem->__lock); diff --git a/sysdeps/mach/hurd/bits/local_lim.h b/sysdeps/mach/hurd/bits/local_lim.h index 348eee74bb..8e781e4965 100644 --- a/sysdeps/mach/hurd/bits/local_lim.h +++ b/sysdeps/mach/hurd/bits/local_lim.h @@ -41,3 +41,6 @@ /* The number of threads per process. */ #define _POSIX_THREAD_THREADS_MAX 64 + +/* Maximum value the semaphore can have. */ +#define SEM_VALUE_MAX (2147483647) From patchwork Mon Feb 10 01:05:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 1235588 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-109343-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=Rs+3oe4o; 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 48G7G44FfRz9sRR for ; Mon, 10 Feb 2020 12:13:48 +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:in-reply-to :references:mime-version:content-transfer-encoding; q=dns; s= default; b=WHW6+l8kmQYmv0Hqd5OGVBTGqDj+2IA4j0/VUE16SvRPbik14Rday WGYF7LGSln/wZ7DJMvPnnoAwt45ybCChfFlRZZ/VUqPPxNOhYyAwFok+NGV3WKnm cu+M3q4rnfdE0ForPnpdoYnuAHqAiou3EByIltceHvpufBSbnlrJ/Y= 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=fesDOFK0uEPV3PTREzzQtfaoHJk=; b=Rs+3oe4oNbsv416ZtfpYkGKSOidL sning7gpxitLymIldBTeLaIBZR0Igc8IPA4YnroD8oK9EoQp8jiIzPwdskHxaCDQ 8ytWS1cIrAwjnbD+UYO+GSRUxjnKAA9kL7VH8+7+lPnJoXPdPX6qCiEgvoZBBtKH u1TjKc4h+I00hyg= Received: (qmail 114099 invoked by alias); 10 Feb 2020 01:13:41 -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 114083 invoked by uid 89); 10 Feb 2020 01:13:41 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.1 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 06/10] htl: Make sem_open return ENOSYS Date: Mon, 10 Feb 2020 02:05:04 +0100 Message-Id: <20200210010508.428251-6-samuel.thibault@ens-lyon.org> In-Reply-To: <20200210010508.428251-1-samuel.thibault@ens-lyon.org> References: <20200210010508.428251-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 instead of EOPNOTSUPP, which is for sockets. --- sysdeps/htl/sem-open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/htl/sem-open.c b/sysdeps/htl/sem-open.c index 28483ef6a5..682f0e1a88 100644 --- a/sysdeps/htl/sem-open.c +++ b/sysdeps/htl/sem-open.c @@ -24,7 +24,7 @@ sem_t * __sem_open (const char *name, int open_flags, ...) { - errno = EOPNOTSUPP; + errno = ENOSYS; return SEM_FAILED; } From patchwork Mon Feb 10 01:05:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 1235584 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-109339-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=WHzqMpUH; 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 48G74y0DXtz9sRR for ; Mon, 10 Feb 2020 12:05:53 +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:in-reply-to :references:mime-version:content-transfer-encoding; q=dns; s= default; b=Woq45O/3RSkW2uSeya1ejaiZUa1VKzdqsSydN91shyl4dg8On2scH k5M3g4SrotxgR/+ERIplCICyqQMfM8FJIe8c09cYoQ7X6pR8Ze/7gEl+RrbV/Oe1 nrpqMBIMOziFyKQa/nF6mKyeIZUvlg6fkH5TYhV6Ik9sht8vQYgoHQ= 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=Wr2cA1FO9lZgrFSSujPiR0AcxiM=; b=WHzqMpUH2ntkLl3XHIAGqLkrL9yY gQumAFGvAFTQMTJTHAYtKdYYJYvnp18G613N6rhiVgjNPUUEwiU0EI4FfaEQytd5 bspNFrVR2Hth0EkRh9u8Nl2c+Nf8j8V4/FUub0gGSmgCLV/n9muvNZ5pWynVYS4+ ERA6lrf0bprRO+M= Received: (qmail 96131 invoked by alias); 10 Feb 2020 01:05:19 -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 95938 invoked by uid 89); 10 Feb 2020 01:05:19 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.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=999999, carry, sem X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault , commit-hurd@gnu.org Subject: [hurd, commited 07/10] htl: Make sem_wait/sem_timedwait interruptible Date: Mon, 10 Feb 2020 02:05:05 +0100 Message-Id: <20200210010508.428251-7-samuel.thibault@ens-lyon.org> In-Reply-To: <20200210010508.428251-1-samuel.thibault@ens-lyon.org> References: <20200210010508.428251-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 --- htl/Makefile | 2 ++ htl/pt-internal.h | 8 ++++++++ sysdeps/htl/sem-timedwait.c | 10 ++++------ sysdeps/mach/htl/pt-block-intr.c | 6 ++++++ sysdeps/mach/htl/pt-block.c | 19 +++++++++++++++++-- sysdeps/mach/htl/pt-timedblock-intr.c | 3 +++ sysdeps/mach/htl/pt-timedblock.c | 8 +++++++- 7 files changed, 47 insertions(+), 9 deletions(-) create mode 100644 sysdeps/mach/htl/pt-block-intr.c create mode 100644 sysdeps/mach/htl/pt-timedblock-intr.c diff --git a/htl/Makefile b/htl/Makefile index 1b33748934..39294c64d1 100644 --- a/htl/Makefile +++ b/htl/Makefile @@ -108,6 +108,8 @@ libpthread-routines := pt-attr pt-attr-destroy pt-attr-getdetachstate \ \ pt-block \ pt-timedblock \ + pt-block-intr \ + pt-timedblock-intr \ pt-wakeup \ pt-docancel \ pt-sysdep \ diff --git a/htl/pt-internal.h b/htl/pt-internal.h index 8ffe1bd970..918c207c3e 100644 --- a/htl/pt-internal.h +++ b/htl/pt-internal.h @@ -270,6 +270,14 @@ extern error_t __pthread_timedblock (struct __pthread *__restrict thread, const struct timespec *__restrict abstime, clockid_t clock_id); +/* Block THREAD with interrupts. */ +extern error_t __pthread_block_intr (struct __pthread *thread); + +/* Block THREAD until *ABSTIME is reached, with interrupts. */ +extern error_t __pthread_timedblock_intr (struct __pthread *__restrict thread, + const struct timespec *__restrict abstime, + clockid_t clock_id); + /* Wakeup THREAD. */ extern void __pthread_wakeup (struct __pthread *thread); diff --git a/sysdeps/htl/sem-timedwait.c b/sysdeps/htl/sem-timedwait.c index 656da41184..a61acfd43f 100644 --- a/sysdeps/htl/sem-timedwait.c +++ b/sysdeps/htl/sem-timedwait.c @@ -30,6 +30,7 @@ __sem_timedwait_internal (sem_t *restrict sem, error_t err; int drain; struct __pthread *self; + clockid_t clock_id = CLOCK_REALTIME; __pthread_spin_lock (&sem->__lock); if (sem->__value > 0) @@ -54,12 +55,9 @@ __sem_timedwait_internal (sem_t *restrict sem, /* Block the thread. */ if (timeout != NULL) - err = __pthread_timedblock (self, timeout, CLOCK_REALTIME); + err = __pthread_timedblock_intr (self, timeout, clock_id); else - { - err = 0; - __pthread_block (self); - } + err = __pthread_block_intr (self); __pthread_spin_lock (&sem->__lock); if (self->prevp == NULL) @@ -82,7 +80,7 @@ __sem_timedwait_internal (sem_t *restrict sem, if (err) { - assert (err == ETIMEDOUT); + assert (err == ETIMEDOUT || err == EINTR); errno = err; return -1; } diff --git a/sysdeps/mach/htl/pt-block-intr.c b/sysdeps/mach/htl/pt-block-intr.c new file mode 100644 index 0000000000..f15beb3a0f --- /dev/null +++ b/sysdeps/mach/htl/pt-block-intr.c @@ -0,0 +1,6 @@ +#include +#define RETTYPE error_t +#define RETURN(val) return val +#define __pthread_block __pthread_block_intr +#define MSG_OPTIONS MACH_RCV_INTERRUPT +#include "pt-block.c" diff --git a/sysdeps/mach/htl/pt-block.c b/sysdeps/mach/htl/pt-block.c index e1500dce33..28bae157d1 100644 --- a/sysdeps/mach/htl/pt-block.c +++ b/sysdeps/mach/htl/pt-block.c @@ -24,15 +24,30 @@ #include +#ifndef MSG_OPTIONS +# define MSG_OPTIONS 0 +#endif + +#ifndef RETTYPE +# define RETTYPE void +#endif + +#ifndef RETURN +# define RETURN(val) +#endif + /* Block THREAD. */ -void +RETTYPE __pthread_block (struct __pthread *thread) { mach_msg_header_t msg; error_t err; - err = __mach_msg (&msg, MACH_RCV_MSG, 0, sizeof msg, + err = __mach_msg (&msg, MACH_RCV_MSG | MSG_OPTIONS, 0, sizeof msg, thread->wakeupmsg.msgh_remote_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); + if ((MSG_OPTIONS & MACH_RCV_INTERRUPT) && err == MACH_RCV_INTERRUPTED) + RETURN(EINTR); assert_perror (err); + RETURN(0); } diff --git a/sysdeps/mach/htl/pt-timedblock-intr.c b/sysdeps/mach/htl/pt-timedblock-intr.c new file mode 100644 index 0000000000..70e132716b --- /dev/null +++ b/sysdeps/mach/htl/pt-timedblock-intr.c @@ -0,0 +1,3 @@ +#define __pthread_timedblock __pthread_timedblock_intr +#define MSG_OPTIONS MACH_RCV_INTERRUPT +#include "pt-timedblock.c" diff --git a/sysdeps/mach/htl/pt-timedblock.c b/sysdeps/mach/htl/pt-timedblock.c index 63af869c90..ead070e397 100644 --- a/sysdeps/mach/htl/pt-timedblock.c +++ b/sysdeps/mach/htl/pt-timedblock.c @@ -26,6 +26,10 @@ #include +#ifndef MSG_OPTIONS +# define MSG_OPTIONS 0 +#endif + /* Block THREAD. */ error_t __pthread_timedblock (struct __pthread *thread, @@ -54,11 +58,13 @@ __pthread_timedblock (struct __pthread *thread, /* Need to do a carry. */ timeout -= (now.tv_nsec - abstime->tv_nsec + 999999) / 1000000; - err = __mach_msg (&msg, MACH_RCV_MSG | MACH_RCV_TIMEOUT, 0, + err = __mach_msg (&msg, MACH_RCV_MSG | MACH_RCV_TIMEOUT | MSG_OPTIONS, 0, sizeof msg, thread->wakeupmsg.msgh_remote_port, timeout, MACH_PORT_NULL); if (err == EMACH_RCV_TIMED_OUT) return ETIMEDOUT; + if ((MSG_OPTIONS & MACH_RCV_INTERRUPT) && err == MACH_RCV_INTERRUPTED) + return EINTR; assert_perror (err); return 0; From patchwork Mon Feb 10 01:05:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 1235590 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-109345-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=DfdSgP+A; 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 48G7GP1F6rz9sRR for ; Mon, 10 Feb 2020 12:14:04 +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:in-reply-to :references:mime-version:content-transfer-encoding; q=dns; s= default; b=un+SL32AdARKdqdKgcO1YxrMQkA1T6SBrLoQF0Q3YIGRj7C/8Pl8I ORBlk+OnekiGnRM71Y0Aw7tFd6fjw+KbhyfM/2zk3bwuQEJecylmxvgUrJaRVlgq MVw+H3e5Ijr4YVGImDMf2jwa780JxuaogcR9+5nNRX8Fjr+21vaoE4= 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=43g0kYFtZS0pWVn4650eLFAPpyo=; b=DfdSgP+AMtMkWDqpKj9lXkSTOLsA O8a7gRm9pDf/yfQ8w7iZuY0iMeJPHD5/lCGpR6I0ybWkfaSUS5cgGFWdiBpu61/5 7q0Aynh0FMXtqWuYlpm6P9wXB6586cFdiNk9FRou6hX9wEI5kwjdjtsgHHUYEf8s n3iOyq3TQXoox6o= Received: (qmail 114167 invoked by alias); 10 Feb 2020 01:13:42 -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 114104 invoked by uid 89); 10 Feb 2020 01:13:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.2 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= X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault , commit-hurd@gnu.org Subject: [hurd, commited 08/10] pthread: Move most sem tests from nptl to sysdeps/pthread Date: Mon, 10 Feb 2020 02:05:06 +0100 Message-Id: <20200210010508.428251-8-samuel.thibault@ens-lyon.org> In-Reply-To: <20200210010508.428251-1-samuel.thibault@ens-lyon.org> References: <20200210010508.428251-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 So they can be checked with htl too. --- nptl/Makefile | 4 +--- sysdeps/mach/hurd/i386/Makefile | 9 +++++++++ sysdeps/pthread/Makefile | 2 ++ {nptl => sysdeps/pthread}/tst-sem1.c | 0 {nptl => sysdeps/pthread}/tst-sem10.c | 0 {nptl => sysdeps/pthread}/tst-sem14.c | 0 {nptl => sysdeps/pthread}/tst-sem15.c | 0 {nptl => sysdeps/pthread}/tst-sem16.c | 0 {nptl => sysdeps/pthread}/tst-sem2.c | 0 {nptl => sysdeps/pthread}/tst-sem3.c | 0 {nptl => sysdeps/pthread}/tst-sem4.c | 0 {nptl => sysdeps/pthread}/tst-sem6.c | 0 {nptl => sysdeps/pthread}/tst-sem7.c | 0 {nptl => sysdeps/pthread}/tst-sem8.c | 0 {nptl => sysdeps/pthread}/tst-sem9.c | 0 15 files changed, 12 insertions(+), 3 deletions(-) rename {nptl => sysdeps/pthread}/tst-sem1.c (100%) rename {nptl => sysdeps/pthread}/tst-sem10.c (100%) rename {nptl => sysdeps/pthread}/tst-sem14.c (100%) rename {nptl => sysdeps/pthread}/tst-sem15.c (100%) rename {nptl => sysdeps/pthread}/tst-sem16.c (100%) rename {nptl => sysdeps/pthread}/tst-sem2.c (100%) rename {nptl => sysdeps/pthread}/tst-sem3.c (100%) rename {nptl => sysdeps/pthread}/tst-sem4.c (100%) rename {nptl => sysdeps/pthread}/tst-sem6.c (100%) rename {nptl => sysdeps/pthread}/tst-sem7.c (100%) rename {nptl => sysdeps/pthread}/tst-sem8.c (100%) rename {nptl => sysdeps/pthread}/tst-sem9.c (100%) diff --git a/nptl/Makefile b/nptl/Makefile index 8e53ff6a49..80e293209c 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -249,9 +249,7 @@ tests = tst-attr2 tst-attr3 tst-default-attr \ tst-rwlock9 tst-rwlock10 tst-rwlock11 tst-rwlock12 \ tst-rwlock14 tst-rwlock15 tst-rwlock17 tst-rwlock18 \ tst-once5 \ - tst-sem1 tst-sem2 tst-sem3 tst-sem4 tst-sem5 tst-sem6 tst-sem7 \ - tst-sem8 tst-sem9 tst-sem10 tst-sem14 \ - tst-sem15 tst-sem16 tst-sem17 \ + tst-sem5 tst-sem17 \ tst-barrier1 tst-barrier2 tst-barrier3 tst-barrier4 \ tst-align tst-align3 \ tst-kill1 tst-kill2 tst-kill3 tst-kill4 tst-kill5 tst-kill6 \ diff --git a/sysdeps/mach/hurd/i386/Makefile b/sysdeps/mach/hurd/i386/Makefile index e303945b2a..a5ccab0956 100644 --- a/sysdeps/mach/hurd/i386/Makefile +++ b/sysdeps/mach/hurd/i386/Makefile @@ -111,6 +111,7 @@ test-xfail-tst-cond13 = yes test-xfail-tst-cond23 = yes test-xfail-tst-rwlock4 = yes test-xfail-tst-rwlock12 = yes +test-xfail-tst-sem3 = yes endif # For bug 25522 @@ -119,6 +120,14 @@ test-xfail-tst-cond24 = yes test-xfail-tst-cond25 = yes endif +# For bug 25524 +ifeq ($(subdir),htl) +test-xfail-tst-sem4 = yes +test-xfail-tst-sem7 = yes +test-xfail-tst-sem8 = yes +test-xfail-tst-sem9 = yes +endif + ifeq ($(subdir),elf) # We do use nested functions involving creation of trampolines, notably for # callbacks whose parameters don't permit to get the context parameters. diff --git a/sysdeps/pthread/Makefile b/sysdeps/pthread/Makefile index 8143eeb1ad..2f07c0cfe6 100644 --- a/sysdeps/pthread/Makefile +++ b/sysdeps/pthread/Makefile @@ -55,6 +55,8 @@ tests += tst-cnd-basic tst-mtx-trylock tst-cnd-broadcast \ tst-once1 tst-once2 tst-once3 tst-once4 \ tst-rwlock1 tst-rwlock4 tst-rwlock5 tst-rwlock13 tst-rwlock16 \ tst-rwlock-tryrdlock-stall tst-rwlock-trywrlock-stall \ + tst-sem1 tst-sem2 tst-sem3 tst-sem4 tst-sem6 tst-sem7 \ + tst-sem8 tst-sem9 tst-sem10 tst-sem14 tst-sem15 tst-sem16 \ tst-spin1 tst-spin2 tst-spin3 tst-spin4 tests += tst-oncex3 tst-oncex4 diff --git a/nptl/tst-sem1.c b/sysdeps/pthread/tst-sem1.c similarity index 100% rename from nptl/tst-sem1.c rename to sysdeps/pthread/tst-sem1.c diff --git a/nptl/tst-sem10.c b/sysdeps/pthread/tst-sem10.c similarity index 100% rename from nptl/tst-sem10.c rename to sysdeps/pthread/tst-sem10.c diff --git a/nptl/tst-sem14.c b/sysdeps/pthread/tst-sem14.c similarity index 100% rename from nptl/tst-sem14.c rename to sysdeps/pthread/tst-sem14.c diff --git a/nptl/tst-sem15.c b/sysdeps/pthread/tst-sem15.c similarity index 100% rename from nptl/tst-sem15.c rename to sysdeps/pthread/tst-sem15.c diff --git a/nptl/tst-sem16.c b/sysdeps/pthread/tst-sem16.c similarity index 100% rename from nptl/tst-sem16.c rename to sysdeps/pthread/tst-sem16.c diff --git a/nptl/tst-sem2.c b/sysdeps/pthread/tst-sem2.c similarity index 100% rename from nptl/tst-sem2.c rename to sysdeps/pthread/tst-sem2.c diff --git a/nptl/tst-sem3.c b/sysdeps/pthread/tst-sem3.c similarity index 100% rename from nptl/tst-sem3.c rename to sysdeps/pthread/tst-sem3.c diff --git a/nptl/tst-sem4.c b/sysdeps/pthread/tst-sem4.c similarity index 100% rename from nptl/tst-sem4.c rename to sysdeps/pthread/tst-sem4.c diff --git a/nptl/tst-sem6.c b/sysdeps/pthread/tst-sem6.c similarity index 100% rename from nptl/tst-sem6.c rename to sysdeps/pthread/tst-sem6.c diff --git a/nptl/tst-sem7.c b/sysdeps/pthread/tst-sem7.c similarity index 100% rename from nptl/tst-sem7.c rename to sysdeps/pthread/tst-sem7.c diff --git a/nptl/tst-sem8.c b/sysdeps/pthread/tst-sem8.c similarity index 100% rename from nptl/tst-sem8.c rename to sysdeps/pthread/tst-sem8.c diff --git a/nptl/tst-sem9.c b/sysdeps/pthread/tst-sem9.c similarity index 100% rename from nptl/tst-sem9.c rename to sysdeps/pthread/tst-sem9.c From patchwork Mon Feb 10 01:05:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 1235581 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-109336-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=a4cgJJhd; 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 48G74Q1T42z9sRR for ; Mon, 10 Feb 2020 12:05:24 +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:in-reply-to :references:mime-version:content-transfer-encoding; q=dns; s= default; b=TzPE3J8DEVk0IWFnjn92q5D2cxFZDZTlMwDAgcU3M2cYyDJZGIPTC 0xsbI/Y/ioBmcREZRiuaqB5m/th0K7UHG8QPd1vvXYYw++iuClF6yTE87TVgLgSr dOCKa3wAYVgvAoPqS8z+9sbOBR4EYdjtjrv0wA6KLP2jQY+0yn7HYg= 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=QEkuKGZtH8RAx9y4X1PwTAyBfh8=; b=a4cgJJhdFA3kgxx4Q5lSnTVRjhnW Q1/4UiDVq1glFl4RY6CoSDI5hnb3jX4CrltwI0fNRx4ef6tc5FbSMyFLszs6sI71 E/snI/Y6mKZEJGexpJOVLbnyVc5cYqXhJVfNdyZPrVy7TWBr2NpLdvJM+h3a/PIX JmNzzRD1VaMoapo= Received: (qmail 95833 invoked by alias); 10 Feb 2020 01:05:18 -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 95808 invoked by uid 89); 10 Feb 2020 01:05:17 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.7 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=H*MI:sk:2020021, 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 09/10] htl: Fix barrier_wait with one thread Date: Mon, 10 Feb 2020 02:05:07 +0100 Message-Id: <20200210010508.428251-9-samuel.thibault@ens-lyon.org> In-Reply-To: <20200210010508.428251-1-samuel.thibault@ens-lyon.org> References: <20200210010508.428251-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 --- sysdeps/htl/pt-barrier-wait.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysdeps/htl/pt-barrier-wait.c b/sysdeps/htl/pt-barrier-wait.c index 47ec440b26..146605abd8 100644 --- a/sysdeps/htl/pt-barrier-wait.c +++ b/sysdeps/htl/pt-barrier-wait.c @@ -29,7 +29,9 @@ pthread_barrier_wait (pthread_barrier_t *barrier) { barrier->__pending = barrier->__count; - if (barrier->__count > 1) + if (barrier->__count == 1) + __pthread_spin_unlock (&barrier->__lock); + else { struct __pthread *wakeup; unsigned n = 0; From patchwork Mon Feb 10 01:05:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 1235583 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-109338-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=ZXdM54rS; 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 48G74k40mNz9sRR for ; Mon, 10 Feb 2020 12:05:42 +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:in-reply-to :references:mime-version:content-transfer-encoding; q=dns; s= default; b=ifCyZ6mGDHoFEv4YnRfDTMUgE/BwaIrTNomLNRcaOoDYkOBuid3Wz zARNZnMaO7+0WpSBjvIQTfEke2szE1Mvd0tfQsrFJ/PgLW6NRgcNYM4jOPM4nGf4 k310Ze8GXj0Ex9+BcAbWFgdfPqRfeTCMqArvRhCHkTpuXStl/XUP1c= 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=Z+GS/BWmnvVO74m4NVlefdzZ1Ho=; b=ZXdM54rS4p1QiheFrMOgaAWkI6d9 N2d5Nj0wzmM1/ycsYsyByaiAGg6W22pOMUXB71l5f/6i+cbo7DoTmdCIZcvD8xmg YmKDozdk6l3NTJvvOzMNaUj4SD/ZOqFYZUCx6KZT0VkC5KmzB3CRbVo1ElkRbxBy KZuLVZN6Sv/0L4g= Received: (qmail 95929 invoked by alias); 10 Feb 2020 01:05:19 -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 95812 invoked by uid 89); 10 Feb 2020 01:05:17 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.8 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=H*MI:sk:2020021 X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault , commit-hurd@gnu.org Subject: [hurd, commited 10/10] pthread: Move most barrier tests from nptl to sysdeps/pthread Date: Mon, 10 Feb 2020 02:05:08 +0100 Message-Id: <20200210010508.428251-10-samuel.thibault@ens-lyon.org> In-Reply-To: <20200210010508.428251-1-samuel.thibault@ens-lyon.org> References: <20200210010508.428251-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 So they can be checked with htl too. --- nptl/Makefile | 1 - sysdeps/mach/hurd/i386/Makefile | 1 + sysdeps/pthread/Makefile | 1 + {nptl => sysdeps/pthread}/tst-barrier1.c | 0 {nptl => sysdeps/pthread}/tst-barrier2.c | 0 {nptl => sysdeps/pthread}/tst-barrier3.c | 0 {nptl => sysdeps/pthread}/tst-barrier4.c | 0 7 files changed, 2 insertions(+), 1 deletion(-) rename {nptl => sysdeps/pthread}/tst-barrier1.c (100%) rename {nptl => sysdeps/pthread}/tst-barrier2.c (100%) rename {nptl => sysdeps/pthread}/tst-barrier3.c (100%) rename {nptl => sysdeps/pthread}/tst-barrier4.c (100%) diff --git a/nptl/Makefile b/nptl/Makefile index 80e293209c..a72022a052 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -250,7 +250,6 @@ tests = tst-attr2 tst-attr3 tst-default-attr \ tst-rwlock14 tst-rwlock15 tst-rwlock17 tst-rwlock18 \ tst-once5 \ tst-sem5 tst-sem17 \ - tst-barrier1 tst-barrier2 tst-barrier3 tst-barrier4 \ tst-align tst-align3 \ tst-kill1 tst-kill2 tst-kill3 tst-kill4 tst-kill5 tst-kill6 \ tst-raise1 \ diff --git a/sysdeps/mach/hurd/i386/Makefile b/sysdeps/mach/hurd/i386/Makefile index a5ccab0956..445724f85f 100644 --- a/sysdeps/mach/hurd/i386/Makefile +++ b/sysdeps/mach/hurd/i386/Makefile @@ -112,6 +112,7 @@ test-xfail-tst-cond23 = yes test-xfail-tst-rwlock4 = yes test-xfail-tst-rwlock12 = yes test-xfail-tst-sem3 = yes +test-xfail-tst-barrier2 = yes endif # For bug 25522 diff --git a/sysdeps/pthread/Makefile b/sysdeps/pthread/Makefile index 2f07c0cfe6..c102f45b6a 100644 --- a/sysdeps/pthread/Makefile +++ b/sysdeps/pthread/Makefile @@ -43,6 +43,7 @@ tests += tst-cnd-basic tst-mtx-trylock tst-cnd-broadcast \ tst-cnd-timedwait tst-thrd-detach tst-mtx-basic tst-thrd-sleep \ tst-mtx-recursive tst-tss-basic tst-call-once tst-mtx-timedlock \ tst-attr1 \ + tst-barrier1 tst-barrier2 tst-barrier3 tst-barrier4 \ tst-basic1 tst-basic2 tst-basic3 tst-basic4 tst-basic5 tst-basic6 \ tst-basic7 \ tst-cond1 tst-cond2 tst-cond3 tst-cond4 tst-cond5 tst-cond6 tst-cond7 \ diff --git a/nptl/tst-barrier1.c b/sysdeps/pthread/tst-barrier1.c similarity index 100% rename from nptl/tst-barrier1.c rename to sysdeps/pthread/tst-barrier1.c diff --git a/nptl/tst-barrier2.c b/sysdeps/pthread/tst-barrier2.c similarity index 100% rename from nptl/tst-barrier2.c rename to sysdeps/pthread/tst-barrier2.c diff --git a/nptl/tst-barrier3.c b/sysdeps/pthread/tst-barrier3.c similarity index 100% rename from nptl/tst-barrier3.c rename to sysdeps/pthread/tst-barrier3.c diff --git a/nptl/tst-barrier4.c b/sysdeps/pthread/tst-barrier4.c similarity index 100% rename from nptl/tst-barrier4.c rename to sysdeps/pthread/tst-barrier4.c