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