From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:53542) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXtlY-000499-6f for qemu-devel@nongnu.org; Tue, 06 Dec 2011 07:04:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RXtlU-0000dg-1C for qemu-devel@nongnu.org; Tue, 06 Dec 2011 07:04:56 -0500 Received: from mail-iy0-f173.google.com ([209.85.210.173]:62657) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXtlT-0000dc-Mc for qemu-devel@nongnu.org; Tue, 06 Dec 2011 07:04:51 -0500 Received: by iakk32 with SMTP id k32so11809554iak.4 for ; Tue, 06 Dec 2011 04:04:51 -0800 (PST) Sender: Paolo Bonzini Message-ID: <4EDE04DB.6070107@redhat.com> Date: Tue, 06 Dec 2011 13:04:43 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1323169274-31657-1-git-send-email-stefanha@linux.vnet.ibm.com> <1323169274-31657-17-git-send-email-stefanha@linux.vnet.ibm.com> <4EDDFFE3.0@suse.de> In-Reply-To: <4EDDFFE3.0@suse.de> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 16/19] Rename get_tls to tls_var List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-15?Q?Andreas_F=E4rber?= Cc: Jan Kiszka , Anthony Liguori , Stefan Hajnoczi , qemu-devel@nongnu.org On 12/06/2011 12:43 PM, Andreas Färber wrote: > Am 06.12.2011 12:01, schrieb Stefan Hajnoczi: >> From: Jan Kiszka >> >> get_tls() can serve as a lvalue as well, so 'get' might be confusing. > > Note that this does not work for POSIX pthread_getspecific(), which > we'll need to support at some point in time, so I don't think this is a > terribly good idea. I already posted the code for pthread_getspecific(), but it didn't work on OpenBSD. The idea was to reserve a single pthread key and allocate a whole block of memory. Then get_tls can use pthread_getspecific() and add an offset within the block of memory. The reason is that with many allocated keys pthread_getspecific() becomes slower. Paolo