From: Artur Bergman Date: Fri, 26 Oct 2001 12:06:30 +0000 (+0000) Subject: Allocing a TLS in runtime is not too hot. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=89e0305a042ccbf862532916368cdde36784686c;p=p5sagit%2Fp5-mst-13.2.git Allocing a TLS in runtime is not too hot. p4raw-id: //depot/perl@12675 --- diff --git a/ext/threads/threads.xs b/ext/threads/threads.xs index 6d8394f..56c046d0 100755 --- a/ext/threads/threads.xs +++ b/ext/threads/threads.xs @@ -23,7 +23,6 @@ void* Perl_thread_run(void * arg) { SHAREDSvLOCK(threads); SHAREDSvEDIT(threads); - PERL_THREAD_ALLOC_SPECIFIC(self_key); PERL_THREAD_SETSPECIFIC(self_key,INT2PTR(void*,thread->tid)); thread_tid_ptr = Perl_newSVuv(PL_sharedsv_space, thread->tid); thread_ptr = Perl_newSVuv(PL_sharedsv_space, PTR2UV(thread)); @@ -279,6 +278,7 @@ void Perl_thread_destruct (ithread* thread) { MODULE = threads PACKAGE = threads BOOT: Perl_sharedsv_init(aTHX); + PERL_THREAD_ALLOC_SPECIFIC(self_key); PL_perl_destruct_level = 2; threads = Perl_sharedsv_new(aTHX); SHAREDSvEDIT(threads);