summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2015-11-05 18:58:56 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2015-11-23 06:55:12 -0500
commitff25d7bcdd32f227c1d1926c13e0ca78af0e3c04 (patch)
tree1c414fd98347fd33fe47189f4050936e07f1c851 /perlio.c
parent80b94025b9e815d47202e20837e43322cf333651 (diff)
downloadperl-ff25d7bcdd32f227c1d1926c13e0ca78af0e3c04.tar.gz
annotate the mutex use of S_more_refcounted_fds
perlio.c:2232:2: warning: releasing mutex 'PL_perlio_mutex' that was not held [-Wthread-safety-analysis] MUTEX_UNLOCK(&PL_perlio_mutex);
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/perlio.c b/perlio.c
index 8ab47e4936..20a347e035 100644
--- a/perlio.c
+++ b/perlio.c
@@ -2204,7 +2204,9 @@ PerlIOBase_dup(pTHX_ PerlIO *f, PerlIO *o, CLONE_PARAMS *param, int flags)
/* Must be called with PL_perlio_mutex locked. */
static void
-S_more_refcounted_fds(pTHX_ const int new_fd) {
+S_more_refcounted_fds(pTHX_ const int new_fd)
+ PERL_TSA_REQUIRES(PL_perlio_mutex)
+{
dVAR;
const int old_max = PL_perlio_fd_refcnt_size;
const int new_max = 16 + (new_fd & ~15);