From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbBJU-0000Uu-7G for qemu-devel@nongnu.org; Wed, 21 Nov 2012 09:30:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TbBJQ-0004xG-4V for qemu-devel@nongnu.org; Wed, 21 Nov 2012 09:30:04 -0500 Received: from goliath.siemens.de ([192.35.17.28]:23969) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbBJP-0004wo-Qo for qemu-devel@nongnu.org; Wed, 21 Nov 2012 09:30:00 -0500 Message-ID: <50ACE564.9030204@siemens.com> Date: Wed, 21 Nov 2012 15:29:56 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <50ACDE8F.5010507@siemens.com> <50ACE050.8050001@redhat.com> In-Reply-To: <50ACE050.8050001@redhat.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: Paolo Bonzini Cc: Kevin Wolf , Stefan Weil , qemu-devel On 2012-11-21 15:08, Paolo Bonzini wrote: > 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. Hmm. A TLS destructor is apparently not available. Is there some "on thread termination" callback mechanism on Windows? Didn't find one on first glance. Jan -- Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux