From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "Gabriel F. T. Gomes" Newsgroups: gmane.comp.lib.glibc.alpha Subject: Re: [PATCH v8 1/8] nptl: Add C11 threads thrd_* functions Date: Thu, 8 Feb 2018 11:49:01 -0200 Message-ID: <20180208114901.7c12242e@keller> References: <1517591084-11347-1-git-send-email-adhemerval.zanella@linaro.org> <1517591084-11347-2-git-send-email-adhemerval.zanella@linaro.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1518097660 4901 195.159.176.226 (8 Feb 2018 13:47:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 8 Feb 2018 13:47:40 +0000 (UTC) Cc: To: Adhemerval Zanella Original-X-From: libc-alpha-return-90143-glibc-alpha=m.gmane.org@sourceware.org Thu Feb 08 14:47:35 2018 Return-path: Envelope-to: glibc-alpha@blaine.gmane.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:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; q=dns; s=default; b=EcNXjpBrKKs0JL639xAOu2YkyA3ZlioFgGwScswCslM m/lWzqqkWxJiJWVaQgXwuWAedUGEx9jVD9SaOCG62uBn86Ig5/zBu8S1F5K6cXkO NPAO/7PyRBDAO9pXByO/QvY5sHu954Xh/BUdBhstndfX8EJrABWoo48NfSiDn4dM = 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:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; s=default; bh=Lug8fKC97EGQ9lnFdiHaIXq/qtg=; b=HWksMgxqHAl3a2G0z uL5oumSa17+q0nqYiamibqZnn7fqAqjTz6PyqVswtbXCFiCrxMUIha70Sjpuv6o2 Pg0KuAzO5LfbUEzihchOaaKkYE4iMUYwiMeNJRwuWUKPwfprHjeeQQxz0CymHRnB tkPCoZvAxtpOqNXab84v/nWjqg= 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: , Original-Sender: libc-alpha-owner@sourceware.org Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=H*r:15.1.1261.35, H*r:172.16.2, H*RU:15.1.1261.35, Hx-spam-relays-external:15.1.1261.35 X-HELO: mo19.mail-out.ovh.net In-Reply-To: <1517591084-11347-2-git-send-email-adhemerval.zanella@linaro.org> X-ClientProxiedBy: EX2.emp.local (172.16.2.2) To EX2.emp.local (172.16.2.2) X-Ovh-Tracer-Id: 6149102341925818057 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtfedrudekgdehiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd Xref: news.gmane.org gmane.comp.lib.glibc.alpha:82491 Archived-At: Received: from server1.sourceware.org ([209.132.180.131] helo=sourceware.org) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ejmXh-000891-8i for glibc-alpha@blaine.gmane.org; Thu, 08 Feb 2018 14:47:13 +0100 Received: (qmail 1161 invoked by alias); 8 Feb 2018 13:49:15 -0000 Received: (qmail 1148 invoked by uid 89); 8 Feb 2018 13:49:14 -0000 I have only a few, minor comments. On Fri, 02 Feb 2018, Adhemerval Zanella wrote: >-/* We do not support C11 . */ >-#define __STDC_NO_THREADS__ 1 I don't know if that actually matters, but should you wait until the other patches in this series (at least patch 2) are in before removing this definition? >+int >+thrd_sleep (const struct timespec* time_point, struct timespec* remaining) >+{ >+ /* It calls the syscalls directly to avoid cancellable version. */ >+ INTERNAL_SYSCALL_DECL (err); >+ int ret = INTERNAL_SYSCALL_CALL (nanosleep, err, time_point, remaining); >+ if (INTERNAL_SYSCALL_ERROR_P (ret, err)) >+ { >+ /* C11 states thrd_sleep function returns -1 if it has been interrupted >+ by a signal, or a negative value if it fails. */ ~~~~~~~~~ This hunk did not apply with git am, because there are more than 8 spaces. >+/* Detach the thread identified by __THR from the current environment >+ (tt does not allow join or wait for it). */ ~~ Did you mean "it"? Or is "tt" something else that I did not understand.