From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12242 invoked by alias); 12 Jul 2018 19:43:43 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 12228 invoked by uid 89); 12 Jul 2018 19:43:43 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-ua0-f195.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=1zScoKMWPnW36UP8UktlImLXRq7wzNLZudV2SlGJKdo=; b=DxZ/kUnkGhal3iQC1jpcawF7s2i3Gl9XOiUl7ifgtnHpTQgp7sL99kcEwdPV0UIbgm /Jppl6i/Sv9FPlkP+Ecjr4+GtoufHzgvQbFLzEQhgZxNpsCuOIvJHg4OCPmsdQ68x4Tl s0XY59xoZBGrDR4jHhyNKvpHucg6BOmhjixMY= Return-Path: Subject: Re: [PATCH v8 1/8] nptl: Add C11 threads thrd_* functions To: Florian Weimer , libc-alpha@sourceware.org References: <1517591084-11347-1-git-send-email-adhemerval.zanella@linaro.org> <1517591084-11347-2-git-send-email-adhemerval.zanella@linaro.org> <0cdb26a0-444c-3b42-f540-2bcf5ed393be@linaro.org> From: Adhemerval Zanella Openpgp: preference=signencrypt Message-ID: <9ebee5f6-60e9-ef33-6f4a-9d5867e71200@linaro.org> Date: Thu, 12 Jul 2018 19:43:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2018-07/txt/msg00347.txt.bz2 On 12/07/2018 16:35, Florian Weimer wrote: > On 07/12/2018 09:32 PM, Adhemerval Zanella wrote: >> >> >> On 12/07/2018 14:52, Adhemerval Zanella wrote: >>> >>> >>> On 12/07/2018 13:46, Florian Weimer wrote: >>>> On 02/02/2018 06:04 PM, Adhemerval Zanella wrote: >>>>> +int >>>>> +thrd_join (thrd_t thr, int *res) >>>>> +{ >>>>> +  void *pthread_res; >>>>> +  int err_code = __pthread_join (thr, &pthread_res); >>>>> +  if (res) >>>>> +   *res = (int)((uintptr_t) pthread_res); >>>>> + >>>>> +  return thrd_err_map (err_code); >>>>> +} >>>> >>>> Slight inconsistency with intptr_t above. >>> >>> Indeed, it seems there is no need to cast. >> >> In fact the cast this construction is still required, since the pthread_join >> returned value might have a different size of the expected c11 thrd_join. > > I meant the inconsistency between intptr_t and uintptr_t. Ah right, there is no requirement to use a signed cast on pthread_create. I will change it to uintptr_t.