summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorArtur Bergman <sky@nanisky.com>2001-10-26 12:06:30 +0000
committerArtur Bergman <sky@nanisky.com>2001-10-26 12:06:30 +0000
commit89e0305a042ccbf862532916368cdde36784686c (patch)
tree51df98c5988c6368e07c7b9927ba1111b89df374 /ext
parent0d73bec8afda581f611a829e9b78bcf09d06a888 (diff)
downloadperl-89e0305a042ccbf862532916368cdde36784686c.tar.gz
Allocing a TLS in runtime is not too hot.
p4raw-id: //depot/perl@12675
Diffstat (limited to 'ext')
-rwxr-xr-xext/threads/threads.xs2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/threads/threads.xs b/ext/threads/threads.xs
index 6d8394f191..56c046d0c2 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);