From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127697 invoked by alias); 14 Dec 2017 20:24:38 -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 127598 invoked by uid 89); 14 Dec 2017 20:24:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Subject: Re: [PATCH] nptl: Add pthread_thread_number_np function From: Florian Weimer To: libc-alpha@sourceware.org References: <20171214185611.D08E1439942EA@oldenburg.str.redhat.com> Message-ID: Date: Thu, 14 Dec 2017 20:24:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171214185611.D08E1439942EA@oldenburg.str.redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2017-12/txt/msg00458.txt.bz2 On 12/14/2017 07:56 PM, Florian Weimer wrote: > The implementation is actually in libc.so. With a full implementation > of pthread_self in libc.so, pthread_thread_number_np is completely > usable without libpthread. And once again, I forgot the NEWS entry. I should say that this is something completely different from gettid, and by itself usable for logging, certain concurrency-related algorithms, and writing DRBGs (where the current thread's number can be used to ensure that different threads get different bit sequences). Thanks, Florian