This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
692d57e
)
Some more threads.xs comments, courtesy jhedden
author
Jarkko Hietaniemi
<jhi@iki.fi>
Sat, 7 Nov 2015 23:24:16 +0000
(18:24 -0500)
committer
Jarkko Hietaniemi
<jhi@iki.fi>
Sat, 14 Nov 2015 01:55:47 +0000
(20:55 -0500)
dist/threads/threads.xs
patch
|
blob
|
blame
|
history
diff --git
a/dist/threads/threads.xs
b/dist/threads/threads.xs
index
535d5ac
..
366877e
100644
(file)
--- a/
dist/threads/threads.xs
+++ b/
dist/threads/threads.xs
@@
-750,6
+750,8
@@
S_ithread_create(
}
PERL_SET_CONTEXT(aTHX);
if (!thread) {
}
PERL_SET_CONTEXT(aTHX);
if (!thread) {
+ /* This lock was acquired in ithread_create()
+ * prior to calling S_ithread_create(). */
MUTEX_UNLOCK(&MY_POOL.create_destruct_mutex);
{
int fd = PerlIO_fileno(Perl_error_log);
MUTEX_UNLOCK(&MY_POOL.create_destruct_mutex);
{
int fd = PerlIO_fileno(Perl_error_log);
@@
-991,6
+993,8
@@
S_ithread_create(
if (rc_stack_size || rc_thread_create) {
#endif
/* Must unlock mutex for destruct call */
if (rc_stack_size || rc_thread_create) {
#endif
/* Must unlock mutex for destruct call */
+ /* This lock was acquired in ithread_create()
+ * prior to calling S_ithread_create(). */
MUTEX_UNLOCK(&MY_POOL.create_destruct_mutex);
thread->state |= PERL_ITHR_NONVIABLE;
S_ithread_free(aTHX_ thread); /* Releases MUTEX */
MUTEX_UNLOCK(&MY_POOL.create_destruct_mutex);
thread->state |= PERL_ITHR_NONVIABLE;
S_ithread_free(aTHX_ thread); /* Releases MUTEX */