diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 1997-11-08 15:03:39 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 1997-11-08 15:03:39 +0000 |
commit | 0b9678a8abcf790b88babcb35eec34072787a87f (patch) | |
tree | d50c10d5faf510d03b1fa735abc8709d93020f8b /perl.c | |
parent | 5ddb6eab5b331747cc6c97d7afbea3b5a48d2c4d (diff) | |
download | perl-0b9678a8abcf790b88babcb35eec34072787a87f.tar.gz |
Get threads working again on Win32
Root cause of fail was init_thread_intern() in
new_struct_thread() (which is called in parent thread)
clobbering dTHR of parent thread.
It is doubtfull if setting 'self' in new_struct_thread()
is 'right' but left in for now.
p4raw-id: //depot/ansiperl@213
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -128,7 +128,9 @@ perl_construct(register PerlInterpreter *sv_interp) #ifdef USE_THREADS INIT_THREADS; -#ifndef WIN32 +#ifdef ALLOC_THREAD_KEY + ALLOC_THREAD_KEY; +#else if (pthread_key_create(&thr_key, 0)) croak("panic: pthread_key_create"); #endif @@ -2829,8 +2831,8 @@ init_main_thread() thr->prev = thr; MUTEX_UNLOCK(&threads_mutex); -#ifdef HAVE_THREAD_INTERN - init_thread_intern(thr); +#ifdef INIT_THREAD_INTERN + INIT_THREAD_INTERN(thr); #else thr->self = pthread_self(); #endif /* HAVE_THREAD_INTERN */ |