diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-11-29 12:40:28 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-11-29 12:40:28 +0000 |
commit | b099ddc068b2498767e6f04ac167d9633b895ec4 (patch) | |
tree | c5565911f062bddb5d68139f8aed5d8489d2a488 /win32/win32thread.c | |
parent | bfc605f9e1d41dd7493c0c0fcfd1304c238dbe4d (diff) | |
download | perl-b099ddc068b2498767e6f04ac167d9633b895ec4.tar.gz |
various fixes for race conditions under threads: mutex locks based
on PL_threadnum were seriously flawed, since it means more than one
thread could enter the critical region; PL_na was global instead of
thread-local; child thread could finish and free thr structures
before Thread->new() got around to creating the Thread object;
cv_clone() needed locking, as it mucks with PL_comppad and other
global data; new_struct_thread() needed to lock template-thread's
mutex while copying its data
p4raw-id: //depot/perl@2385
Diffstat (limited to 'win32/win32thread.c')
-rw-r--r-- | win32/win32thread.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/win32/win32thread.c b/win32/win32thread.c index 1eb0e872c6..b40c5aa251 100644 --- a/win32/win32thread.c +++ b/win32/win32thread.c @@ -92,7 +92,6 @@ Perl_thread_create(struct perl_thread *thr, thread_func_t *fn) DWORD junk; unsigned long th; - MUTEX_LOCK(&thr->mutex); DEBUG_S(PerlIO_printf(PerlIO_stderr(), "%p: create OS thread\n", thr)); #ifdef USE_RTL_THREAD_API @@ -126,7 +125,6 @@ Perl_thread_create(struct perl_thread *thr, thread_func_t *fn) #endif /* !USE_RTL_THREAD_API */ DEBUG_S(PerlIO_printf(PerlIO_stderr(), "%p: OS thread = %p, id=%ld\n", thr, thr->self, junk)); - MUTEX_UNLOCK(&thr->mutex); return thr->self ? 0 : -1; } #endif |