From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.1 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 dcvr.yhbt.net (Postfix) with ESMTPS id AD52D1F597 for ; Fri, 20 Jul 2018 15:02:26 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:from:to:cc:references:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=jKJxKe9D+o2tk8R4 Yeopzm4xh0k6tLnx74VxvCSKI6hwb9bb2umt/LpXRP4qjr6BXKvN0j9EC9LDm+iR 4bFYE0C+QsSSJBuuHYGwPvU6iDN2beBpuNOauPWKViiYKQlUFKUx1+NO8UGa5h+a NjLc/e6pAVGn6/ecQQwsl1xHrTc= 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:subject:from:to:cc:references:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=36TaTEitM91WvsIdkemWk7 yg3v8=; b=IPSzpeVqDb551xd5dwatYHBGXyV7JaknlzZZfaJ8z61EcFUD6HYMRT 9Bkpv5GPn/Ni2rIiT3/X70/ZfsIvP837VzsAAZe53F/SHNuJGKMT84OiFRr5GyFd ZR8NucN5EwPnLhsMixwsUZd7cIlNdj+/rhQMxj0M0tsHOTeN190mo= Received: (qmail 40904 invoked by alias); 20 Jul 2018 15:02:24 -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 Received: (qmail 40888 invoked by uid 89); 20 Jul 2018 15:02:23 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: smtp.707.technology Subject: Re: [PATCH v8 0/8] Add support for ISO C threads.h [thrd_exit] From: Rical Jasan To: Adhemerval Zanella Cc: Joseph Myers , Carlos O'Donell , libc-alpha@sourceware.org, Florian Weimer References: <1517591084-11347-1-git-send-email-adhemerval.zanella@linaro.org> <203a3def-74d0-fa66-9792-a587a089a359@linaro.org> <46c7b370-f98d-30a3-9aac-c5e2c5d5e1d0@linaro.org> <00cbaea3-d979-d766-58b1-a4b0822ca678@redhat.com> Message-ID: Date: Fri, 20 Jul 2018 08:02:18 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Regarding thrd_exit, the new documentation is saying: If this function is called from a single thread process, the call to this function is equivalent to @code{exit(0)}. Returning from a thread-start function is equivalent to calling @code{thrd_exit}. The standard says: The program shall terminate normally after the last thread has been terminated. The behavior shall be as if the program called the exit function with the status EXIT_SUCCESS at thread termination time. I came up with: If this function is called from a single-threaded process, the call is equivalent to calling @code{exit} with @code{EXIT_SUCCESS} (@pxref{Normal Termination}). Also note that returning from a function that started a thread is equivalent to calling @code{thrd_exit}. but I don't feel like the first sentence of each of those quite lines up. I suppose "single-threaded" and "last thread" could be used interchangeably, but I don't think it gives the same impression. Also, the standard doesn't mention the function case. Seems like a good point, but maybe I'm not reading "thread-start function" right. Any suggestions? Thanks, Rical