Remove all the 5005threads specific mutex macros, which are now vestigial.

This commit is contained in:
Nicholas Clark 2009-05-21 10:55:37 +02:00
parent d525a7b208
commit b14647bbef
6 changed files with 0 additions and 62 deletions

2
doio.c
View File

@ -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

7
hv.c
View File

@ -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);

View File

@ -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;
}

View File

@ -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

6
util.c
View File

@ -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;

View File

@ -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;