From patchwork Sun Apr 1 23:58:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 894073 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-91311-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.b="FWS+DTRj"; 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 40DskJ1rHPz9s0t for ; Mon, 2 Apr 2018 09:58:16 +1000 (AEST) 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; q=dns; s= default; b=HweshshxVyEWG2hGJk4eETofconGiVnIlyfRKkiP0NBdxIGF3p+9k j7RWo3rAXa3F17bYV9fBSoh8RnANRn/568T/dRvojpZwaV/cn2dRyQhF9DbmMrwL 8RUBDG+3sfdzNgvWqVOt/hn5/LDMUdep/9W4Q4hY13EfKdkVw+byZg= 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; s=default; bh=cSop0m/mG5ghlYRbhEhNOTuAhGc=; b=FWS+DTRjNBszNC2sgxTtP+u6ZQTP NNkVHeoNra3anGoi2GP5MIkUBsW0rKlAnjMmBeYBEqM5ycxKyp1JmDOUFI3XqnIh Sm3JXzbAMSMyrAZTbflqgMaPqKfIeQpsfcE+i25aYIJYbPm4GN/DgrdrxaQfeqV0 phww07Bxs/LZNSg= Received: (qmail 48932 invoked by alias); 1 Apr 2018 23:58:10 -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 48923 invoked by uid 89); 1 Apr 2018 23:58:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, SPF_NEUTRAL autolearn=ham version=3.3.2 spammy=controlling, 3212, realtime, thibault X-HELO: hera.aquilenet.fr From: Samuel Thibault To: libc-alpha@sourceware.org Cc: Samuel Thibault Subject: [hurd,commited] hurd: Advertise libpthread Date: Mon, 2 Apr 2018 01:58:03 +0200 Message-Id: <20180401235803.10988-1-samuel.thibault@ens-lyon.org> * sysdeps/mach/hurd/bits/local_lim.h (_POSIX_THREAD_KEYS_MAX, _POSIX_THREAD_DESTRUCTOR_ITERATIONS, _POSIX_THREAD_THREADS_MAX): Define macros. * sysdeps/mach/hurd/bits/posix_opt.h (_POSIX_THREADS, _POSIX_THREAD_ATTR_STACKSIZE, _POSIX_THREAD_ATTR_STACKADDR, _POSIX_SEMAPHORES, _POSIX_READER_WRITER_LOCKS, _POSIX_TIMEOUTS, _POSIX_SPIN_LOCKS, _POSIX_BARRIERS): Define macros to 200809L. --- ChangeLog | 10 +++++++++ sysdeps/mach/hurd/bits/local_lim.h | 9 ++++++++ sysdeps/mach/hurd/bits/posix_opt.h | 42 +++++++++++++++++++++++++------------- 3 files changed, 47 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2d813a8eef..c853b65493 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2018-04-02 Samuel Thibault + + * sysdeps/mach/hurd/bits/local_lim.h (_POSIX_THREAD_KEYS_MAX, + _POSIX_THREAD_DESTRUCTOR_ITERATIONS, _POSIX_THREAD_THREADS_MAX): Define + macros. + * sysdeps/mach/hurd/bits/posix_opt.h (_POSIX_THREADS, + _POSIX_THREAD_ATTR_STACKSIZE, _POSIX_THREAD_ATTR_STACKADDR, + _POSIX_SEMAPHORES, _POSIX_READER_WRITER_LOCKS, _POSIX_TIMEOUTS, + _POSIX_SPIN_LOCKS, _POSIX_BARRIERS): Define macros to 200809L. + 2018-04-02 Agustina Arzille Amos Jeffries David Michael diff --git a/sysdeps/mach/hurd/bits/local_lim.h b/sysdeps/mach/hurd/bits/local_lim.h index 8a1af914f3..97f87ad5d2 100644 --- a/sysdeps/mach/hurd/bits/local_lim.h +++ b/sysdeps/mach/hurd/bits/local_lim.h @@ -32,3 +32,12 @@ suitable, and `sysconf' will return a number at least as large. */ #define NGROUPS_MAX 256 + +/* The number of data keys per process. */ +#define _POSIX_THREAD_KEYS_MAX 128 + +/* Controlling the iterations of destructors for thread-specific data. */ +#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 + +/* The number of threads per process. */ +#define _POSIX_THREAD_THREADS_MAX 64 diff --git a/sysdeps/mach/hurd/bits/posix_opt.h b/sysdeps/mach/hurd/bits/posix_opt.h index d42c010c20..dfb0ba46ec 100644 --- a/sysdeps/mach/hurd/bits/posix_opt.h +++ b/sysdeps/mach/hurd/bits/posix_opt.h @@ -71,24 +71,38 @@ /* XPG4.2 shared memory is not supported. */ #undef _XOPEN_SHM -/* We do not have the POSIX threads interface. */ -#define _POSIX_THREADS -1 +/* Tell we have POSIX threads. */ +#define _POSIX_THREADS 200809L /* We have the reentrant functions described in POSIX. */ #define _POSIX_REENTRANT_FUNCTIONS 1 #define _POSIX_THREAD_SAFE_FUNCTIONS 200809L -/* These are all things that won't be supported when _POSIX_THREADS is not. */ +/* We do not provide priority scheduling for threads. */ #define _POSIX_THREAD_PRIORITY_SCHEDULING -1 -#define _POSIX_THREAD_ATTR_STACKSIZE -1 -#define _POSIX_THREAD_ATTR_STACKADDR -1 + +/* We support user-defined stack sizes. */ +#define _POSIX_THREAD_ATTR_STACKSIZE 200809L + +/* We support user-defined stacks. */ +#define _POSIX_THREAD_ATTR_STACKADDR 200809L + +/* We do not support priority inheritence. */ #define _POSIX_THREAD_PRIO_INHERIT -1 + +/* We do not support priority protection. */ #define _POSIX_THREAD_PRIO_PROTECT -1 + #ifdef __USE_XOPEN2K8 +/* We do not support priority inheritence for robust mutexes. */ # define _POSIX_THREAD_ROBUST_PRIO_INHERIT -1 + +/* We do not support priority protection for robust mutexes. */ # define _POSIX_THREAD_ROBUST_PRIO_PROTECT -1 #endif -#define _POSIX_SEMAPHORES -1 + +/* We support POSIX.1b semaphores. */ +#define _POSIX_SEMAPHORES 200809L /* Real-time signals are not yet supported. */ #define _POSIX_REALTIME_SIGNALS -1 @@ -121,17 +135,17 @@ /* GNU libc provides regular expression handling. */ #define _POSIX_REGEXP 1 -/* Reader/Writer locks are not available. */ -#define _POSIX_READER_WRITER_LOCKS -1 +/* Reader/Writer locks are available. */ +#define _POSIX_READER_WRITER_LOCKS 200809L /* We have a POSIX shell. */ #define _POSIX_SHELL 1 -/* We cannot support the Timeouts option without _POSIX_THREADS. */ -#define _POSIX_TIMEOUTS -1 +/* We support the Timeouts option. */ +#define _POSIX_TIMEOUTS 200809L -/* We do not support spinlocks. */ -#define _POSIX_SPIN_LOCKS -1 +/* We support spinlocks. */ +#define _POSIX_SPIN_LOCKS 200809L /* The `spawn' function family is supported. */ #define _POSIX_SPAWN 200809L @@ -139,8 +153,8 @@ /* We do not have POSIX timers, but could in future without ABI change. */ #define _POSIX_TIMERS 0 -/* The barrier functions are not available. */ -#define _POSIX_BARRIERS -1 +/* The barrier functions are available. */ +#define _POSIX_BARRIERS 200809L /* POSIX message queues could be available in future. */ #define _POSIX_MESSAGE_PASSING 0