summaryrefslogtreecommitdiff
path: root/ext/threads
diff options
context:
space:
mode:
authorArtur Bergman <sky@nanisky.com>2001-09-26 07:04:21 +0000
committerArtur Bergman <sky@nanisky.com>2001-09-26 07:04:21 +0000
commitd5ecd10939d5f9a31faea7581a6303b408507b6f (patch)
treee4d404bd3952d1b5574ac4facc0c8b581b115d11 /ext/threads
parent22d727505a1cfc07204c4318ab8f904147376cb5 (diff)
downloadperl-d5ecd10939d5f9a31faea7581a6303b408507b6f.tar.gz
Fix negative refcount introduced by #12223.
p4raw-id: //depot/perl@12225
Diffstat (limited to 'ext/threads')
-rwxr-xr-xext/threads/threads.xs4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/threads/threads.xs b/ext/threads/threads.xs
index 5678bcb71a..cbfcd1f0f8 100755
--- a/ext/threads/threads.xs
+++ b/ext/threads/threads.xs
@@ -281,12 +281,12 @@ BOOT:
#else
thread->thr = pthread_self();
#endif
+ SHAREDSvEDIT(threads);
thread_tid_ptr = Perl_newSVuv(PL_sharedsv_space, PTR2UV(thread->thr));
thread_ptr = Perl_newSVuv(PL_sharedsv_space, PTR2UV(thread));
- SHAREDSvEDIT(threads);
hv_store_ent((HV*) SHAREDSvGET(threads), thread_tid_ptr, thread_ptr,0);
- SHAREDSvRELEASE(threads);
SvREFCNT_dec(thread_tid_ptr);
+ SHAREDSvRELEASE(threads);
}
MUTEX_INIT(&create_mutex);