summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doio.c2
-rw-r--r--hv.c7
-rw-r--r--pp_sys.c2
-rw-r--r--thread.h40
-rw-r--r--util.c6
-rw-r--r--win32/win32.c5
6 files changed, 0 insertions, 62 deletions
diff --git a/doio.c b/doio.c
index 0e46582e89..8a12268474 100644
--- a/doio.c
+++ b/doio.c
@@ -626,7 +626,6 @@ Perl_do_openn(pTHX_ GV *gv, register const char *oname, I32 len, int as_raw,
Pid_t pid;
SV *sv;
- LOCK_FDPID_MUTEX;
sv = *av_fetch(PL_fdpid,fd,TRUE);
SvUPGRADE(sv, SVt_IV);
pid = SvIVX(sv);
@@ -634,7 +633,6 @@ Perl_do_openn(pTHX_ GV *gv, register const char *oname, I32 len, int as_raw,
sv = *av_fetch(PL_fdpid,savefd,TRUE);
SvUPGRADE(sv, SVt_IV);
SvIV_set(sv, pid);
- UNLOCK_FDPID_MUTEX;
}
#endif
diff --git a/hv.c b/hv.c
index e3dee46de1..a6b4448cd3 100644
--- a/hv.c
+++ b/hv.c
@@ -2324,13 +2324,10 @@ S_unshare_hek_or_pvn(pTHX_ const HEK *hek, const char *str, I32 len, U32 hash)
shared hek */
assert (he->shared_he_he.hent_hek == hek);
- LOCK_STRTAB_MUTEX;
if (he->shared_he_he.he_valu.hent_refcount - 1) {
--he->shared_he_he.he_valu.hent_refcount;
- UNLOCK_STRTAB_MUTEX;
return;
}
- UNLOCK_STRTAB_MUTEX;
hash = HEK_HASH(hek);
} else if (len < 0) {
@@ -2352,7 +2349,6 @@ S_unshare_hek_or_pvn(pTHX_ const HEK *hek, const char *str, I32 len, U32 hash)
} */
xhv = (XPVHV*)SvANY(PL_strtab);
/* assert(xhv_array != 0) */
- LOCK_STRTAB_MUTEX;
first = oentry = &(HvARRAY(PL_strtab))[hash & (I32) HvMAX(PL_strtab)];
if (he) {
const HE *const he_he = &(he->shared_he_he);
@@ -2387,7 +2383,6 @@ S_unshare_hek_or_pvn(pTHX_ const HEK *hek, const char *str, I32 len, U32 hash)
}
}
- UNLOCK_STRTAB_MUTEX;
if (!entry && ckWARN_d(WARN_INTERNAL))
Perl_warner(aTHX_ packWARN(WARN_INTERNAL),
"Attempt to free non-existent shared string '%s'%s"
@@ -2452,7 +2447,6 @@ S_share_hek_flags(pTHX_ const char *str, I32 len, register U32 hash, int flags)
*/
/* assert(xhv_array != 0) */
- LOCK_STRTAB_MUTEX;
entry = (HvARRAY(PL_strtab))[hindex];
for (;entry; entry = HeNEXT(entry)) {
if (HeHASH(entry) != hash) /* strings can't be equal */
@@ -2510,7 +2504,6 @@ S_share_hek_flags(pTHX_ const char *str, I32 len, register U32 hash, int flags)
}
++entry->he_valu.hent_refcount;
- UNLOCK_STRTAB_MUTEX;
if (flags & HVhek_FREEKEY)
Safefree(str);
diff --git a/pp_sys.c b/pp_sys.c
index bcd99a53cb..23f79ba4c6 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -242,7 +242,6 @@ S_emulate_eaccess(pTHX_ const char* path, Mode_t mode)
const Gid_t egid = getegid();
int res;
- LOCK_CRED_MUTEX;
#if !defined(HAS_SETREUID) && !defined(HAS_SETRESUID)
Perl_croak(aTHX_ "switching effective uid is not implemented");
#else
@@ -288,7 +287,6 @@ S_emulate_eaccess(pTHX_ const char* path, Mode_t mode)
#endif
#endif
Perl_croak(aTHX_ "leaving effective gid failed");
- UNLOCK_CRED_MUTEX;
return res;
}
diff --git a/thread.h b/thread.h
index 3a059b5f86..3b84f369f7 100644
--- a/thread.h
+++ b/thread.h
@@ -412,46 +412,6 @@
# define COND_DESTROY(c)
#endif
-#ifndef LOCK_SV_MUTEX
-# define LOCK_SV_MUTEX
-#endif
-
-#ifndef UNLOCK_SV_MUTEX
-# define UNLOCK_SV_MUTEX
-#endif
-
-#ifndef LOCK_STRTAB_MUTEX
-# define LOCK_STRTAB_MUTEX
-#endif
-
-#ifndef UNLOCK_STRTAB_MUTEX
-# define UNLOCK_STRTAB_MUTEX
-#endif
-
-#ifndef LOCK_CRED_MUTEX
-# define LOCK_CRED_MUTEX
-#endif
-
-#ifndef UNLOCK_CRED_MUTEX
-# define UNLOCK_CRED_MUTEX
-#endif
-
-#ifndef LOCK_FDPID_MUTEX
-# define LOCK_FDPID_MUTEX
-#endif
-
-#ifndef UNLOCK_FDPID_MUTEX
-# define UNLOCK_FDPID_MUTEX
-#endif
-
-#ifndef LOCK_SV_LOCK_MUTEX
-# define LOCK_SV_LOCK_MUTEX
-#endif
-
-#ifndef UNLOCK_SV_LOCK_MUTEX
-# define UNLOCK_SV_LOCK_MUTEX
-#endif
-
#ifndef LOCK_DOLLARZERO_MUTEX
# define LOCK_DOLLARZERO_MUTEX
#endif
diff --git a/util.c b/util.c
index 782ffde51d..469a9dac47 100644
--- a/util.c
+++ b/util.c
@@ -2347,9 +2347,7 @@ Perl_my_popen_list(pTHX_ const char *mode, int n, SV **args)
else
PerlLIO_close(p[that]); /* close child's end of pipe */
- LOCK_FDPID_MUTEX;
sv = *av_fetch(PL_fdpid,p[This],TRUE);
- UNLOCK_FDPID_MUTEX;
SvUPGRADE(sv,SVt_IV);
SvIV_set(sv, pid);
PL_forkprocess = pid;
@@ -2517,9 +2515,7 @@ Perl_my_popen(pTHX_ const char *cmd, const char *mode)
else
PerlLIO_close(p[that]);
- LOCK_FDPID_MUTEX;
sv = *av_fetch(PL_fdpid,p[This],TRUE);
- UNLOCK_FDPID_MUTEX;
SvUPGRADE(sv,SVt_IV);
SvIV_set(sv, pid);
PL_forkprocess = pid;
@@ -2863,9 +2859,7 @@ Perl_my_pclose(pTHX_ PerlIO *ptr)
bool close_failed;
dSAVEDERRNO;
- LOCK_FDPID_MUTEX;
svp = av_fetch(PL_fdpid,PerlIO_fileno(ptr),TRUE);
- UNLOCK_FDPID_MUTEX;
pid = (SvTYPE(*svp) == SVt_IV) ? SvIVX(*svp) : -1;
SvREFCNT_dec(*svp);
*svp = &PL_sv_undef;
diff --git a/win32/win32.c b/win32/win32.c
index cef828b998..2397f5c6de 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -3075,9 +3075,7 @@ win32_popen(const char *command, const char *mode)
lock_held = 0;
}
- LOCK_FDPID_MUTEX;
sv_setiv(*av_fetch(w32_fdpid, p[parent], TRUE), childpid);
- UNLOCK_FDPID_MUTEX;
/* set process id so that it can be returned by perl's open() */
PL_forkprocess = childpid;
@@ -3118,7 +3116,6 @@ win32_pclose(PerlIO *pf)
int childpid, status;
SV *sv;
- LOCK_FDPID_MUTEX;
sv = *av_fetch(w32_fdpid, PerlIO_fileno(pf), TRUE);
if (SvIOK(sv))
@@ -3127,7 +3124,6 @@ win32_pclose(PerlIO *pf)
childpid = 0;
if (!childpid) {
- UNLOCK_FDPID_MUTEX;
errno = EBADF;
return -1;
}
@@ -3138,7 +3134,6 @@ win32_pclose(PerlIO *pf)
fclose(pf);
#endif
SvIVX(sv) = 0;
- UNLOCK_FDPID_MUTEX;
if (win32_waitpid(childpid, &status, 0) == -1)
return -1;