summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-02-15 22:31:23 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-02-15 22:31:23 -0800
commit12605ff99dc0b98fd730bbd2380934b87b8b32f5 (patch)
tree5e09993cf6bea20b2c35d09cb467fedb225bd5bd /perlio.c
parent962bcf2846ff67ac4c58856ea567b5bf0e9fb52e (diff)
downloadperl-12605ff99dc0b98fd730bbd2380934b87b8b32f5.tar.gz
add refcnt_inc/dec to perldiag
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/perlio.c b/perlio.c
index 6a092d0b93..42bdb849b4 100644
--- a/perlio.c
+++ b/perlio.c
@@ -2412,6 +2412,7 @@ PerlIOUnix_refcnt_inc(int fd)
PL_perlio_fd_refcnt[fd]++;
if (PL_perlio_fd_refcnt[fd] <= 0) {
+ /* diag_listed_as: refcnt_inc: fd %d%s */
Perl_croak(aTHX_ "refcnt_inc: fd %d: %d <= 0\n",
fd, PL_perlio_fd_refcnt[fd]);
}
@@ -2422,6 +2423,7 @@ PerlIOUnix_refcnt_inc(int fd)
MUTEX_UNLOCK(&PL_perlio_mutex);
#endif
} else {
+ /* diag_listed_as: refcnt_inc: fd %d%s */
Perl_croak(aTHX_ "refcnt_inc: fd %d < 0\n", fd);
}
}
@@ -2437,10 +2439,12 @@ PerlIOUnix_refcnt_dec(int fd)
MUTEX_LOCK(&PL_perlio_mutex);
#endif
if (fd >= PL_perlio_fd_refcnt_size) {
+ /* diag_listed_as: refcnt_dec: fd %d%s */
Perl_croak(aTHX_ "refcnt_dec: fd %d >= refcnt_size %d\n",
fd, PL_perlio_fd_refcnt_size);
}
if (PL_perlio_fd_refcnt[fd] <= 0) {
+ /* diag_listed_as: refcnt_dec: fd %d%s */
Perl_croak(aTHX_ "refcnt_dec: fd %d: %d <= 0\n",
fd, PL_perlio_fd_refcnt[fd]);
}
@@ -2450,6 +2454,7 @@ PerlIOUnix_refcnt_dec(int fd)
MUTEX_UNLOCK(&PL_perlio_mutex);
#endif
} else {
+ /* diag_listed_as: refcnt_dec: fd %d%s */
Perl_croak(aTHX_ "refcnt_dec: fd %d < 0\n", fd);
}
return cnt;