From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbAyb-0005w7-MZ for qemu-devel@nongnu.org; Wed, 21 Nov 2012 09:08:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TbAyU-0006ki-Rt for qemu-devel@nongnu.org; Wed, 21 Nov 2012 09:08:29 -0500 Received: from mail-ie0-f173.google.com ([209.85.223.173]:52947) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbAyU-0006kZ-NO for qemu-devel@nongnu.org; Wed, 21 Nov 2012 09:08:22 -0500 Received: by mail-ie0-f173.google.com with SMTP id e13so233530iej.4 for ; Wed, 21 Nov 2012 06:08:22 -0800 (PST) Sender: Paolo Bonzini Message-ID: <50ACE050.8050001@redhat.com> Date: Wed, 21 Nov 2012 15:08:16 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <50ACDE8F.5010507@siemens.com> In-Reply-To: <50ACDE8F.5010507@siemens.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] coroutine: Fix win32 variant for older mingw32 compilers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Kevin Wolf , Stefan Weil , qemu-devel Il 21/11/2012 15:00, Jan Kiszka ha scritto: > + if (!TlsGetValue(current_tls_index)) { > + leader = g_malloc0(sizeof(*leader)); > + leader->fiber = ConvertThreadToFiber(NULL); > + TlsSetValue(current_tls_index, &leader->base); > } Leaking leader is a bit bad, but it looks ok for 1.3. For 1.4 we really should bring back a portable solution for TLS that includes statically-allocated data. Paolo