summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>1998-07-20 17:40:00 -0400
committerGurusamy Sarathy <gsar@cpan.org>1998-08-02 06:16:03 +0000
commit8b73bbec3102cdf25a35c954eb1aab85acc07808 (patch)
tree52e125d1fa92882b072415b5ac465a817f731bc7 /perl.c
parentbd869e3a5834bd5d26dd079fef07f5c567f6ca97 (diff)
downloadperl-8b73bbec3102cdf25a35c954eb1aab85acc07808.tar.gz
tweaked version of suggested patch
Message-Id: <199807210140.VAA17186@monk.mps.ohio-state.edu> Subject: [PATCH 5.004_75] Enable -DS p4raw-id: //depot/maint-5.005/perl@1701
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/perl.c b/perl.c
index 0e39dbeeab..7217536c92 100644
--- a/perl.c
+++ b/perl.c
@@ -256,7 +256,7 @@ perl_destruct(register PerlInterpreter *sv_interp)
/* Pass 1 on any remaining threads: detach joinables, join zombies */
retry_cleanup:
MUTEX_LOCK(&PL_threads_mutex);
- DEBUG_L(PerlIO_printf(PerlIO_stderr(),
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(),
"perl_destruct: waiting for %d threads...\n",
PL_nthreads - 1));
for (t = thr->next; t != thr; t = t->next) {
@@ -264,7 +264,7 @@ perl_destruct(register PerlInterpreter *sv_interp)
switch (ThrSTATE(t)) {
AV *av;
case THRf_ZOMBIE:
- DEBUG_L(PerlIO_printf(PerlIO_stderr(),
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(),
"perl_destruct: joining zombie %p\n", t));
ThrSETSTATE(t, THRf_DEAD);
MUTEX_UNLOCK(&t->mutex);
@@ -278,11 +278,11 @@ perl_destruct(register PerlInterpreter *sv_interp)
MUTEX_UNLOCK(&PL_threads_mutex);
JOIN(t, &av);
SvREFCNT_dec((SV*)av);
- DEBUG_L(PerlIO_printf(PerlIO_stderr(),
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(),
"perl_destruct: joined zombie %p OK\n", t));
goto retry_cleanup;
case THRf_R_JOINABLE:
- DEBUG_L(PerlIO_printf(PerlIO_stderr(),
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(),
"perl_destruct: detaching thread %p\n", t));
ThrSETSTATE(t, THRf_R_DETACHED);
/*
@@ -296,7 +296,7 @@ perl_destruct(register PerlInterpreter *sv_interp)
MUTEX_UNLOCK(&t->mutex);
goto retry_cleanup;
default:
- DEBUG_L(PerlIO_printf(PerlIO_stderr(),
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(),
"perl_destruct: ignoring %p (state %u)\n",
t, ThrSTATE(t)));
MUTEX_UNLOCK(&t->mutex);
@@ -308,14 +308,14 @@ perl_destruct(register PerlInterpreter *sv_interp)
/* Pass 2 on remaining threads: wait for the thread count to drop to one */
while (PL_nthreads > 1)
{
- DEBUG_L(PerlIO_printf(PerlIO_stderr(),
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(),
"perl_destruct: final wait for %d threads\n",
PL_nthreads - 1));
COND_WAIT(&PL_nthreads_cond, &PL_threads_mutex);
}
/* At this point, we're the last thread */
MUTEX_UNLOCK(&PL_threads_mutex);
- DEBUG_L(PerlIO_printf(PerlIO_stderr(), "perl_destruct: armageddon has arrived\n"));
+ DEBUG_S(PerlIO_printf(PerlIO_stderr(), "perl_destruct: armageddon has arrived\n"));
MUTEX_DESTROY(&PL_threads_mutex);
COND_DESTROY(&PL_nthreads_cond);
#endif /* !defined(FAKE_THREADS) */
@@ -1064,10 +1064,8 @@ perl_run(PerlInterpreter *sv_interp)
if (!PL_restartop) {
DEBUG_x(dump_all());
DEBUG(PerlIO_printf(Perl_debug_log, "\nEXECUTING...\n\n"));
-#ifdef USE_THREADS
- DEBUG_L(PerlIO_printf(Perl_debug_log, "main thread is 0x%lx\n",
+ DEBUG_S(PerlIO_printf(Perl_debug_log, "main thread is 0x%lx\n",
(unsigned long) thr));
-#endif /* USE_THREADS */
if (PL_minus_c) {
PerlIO_printf(PerlIO_stderr(), "%s syntax OK\n", PL_origfilename);
@@ -1571,7 +1569,7 @@ moreswitches(char *s)
#ifdef DEBUGGING
forbid_setid("-D");
if (isALPHA(s[1])) {
- static char debopts[] = "psltocPmfrxuLHXD";
+ static char debopts[] = "psltocPmfrxuLHXDS";
char *d;
for (s++; *s && (d = strchr(debopts,*s)); s++)
@@ -2889,10 +2887,8 @@ my_exit(U32 status)
{
dTHR;
-#ifdef USE_THREADS
- DEBUG_L(PerlIO_printf(Perl_debug_log, "my_exit: thread %p, status %lu\n",
+ DEBUG_S(PerlIO_printf(Perl_debug_log, "my_exit: thread %p, status %lu\n",
thr, (unsigned long) status));
-#endif /* USE_THREADS */
switch (status) {
case 0:
STATUS_ALL_SUCCESS;