From: Vincent Pit Date: Mon, 6 Apr 2015 19:51:36 +0000 (-0300) Subject: Rename I_CHECK_MUTEX_* to I_CHECK_* X-Git-Tag: v0.35~4 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=b58bc186ae53367c8df3b55e162f101c8e102a8d;p=perl%2Fmodules%2Findirect.git Rename I_CHECK_MUTEX_* to I_CHECK_* --- diff --git a/indirect.xs b/indirect.xs index bd52eee..0de84e5 100644 --- a/indirect.xs +++ b/indirect.xs @@ -167,17 +167,17 @@ #endif #if defined(OP_CHECK_MUTEX_LOCK) && defined(OP_CHECK_MUTEX_UNLOCK) -# define I_CHECK_MUTEX_LOCK OP_CHECK_MUTEX_LOCK -# define I_CHECK_MUTEX_UNLOCK OP_CHECK_MUTEX_UNLOCK +# define I_CHECK_LOCK OP_CHECK_MUTEX_LOCK +# define I_CHECK_UNLOCK OP_CHECK_MUTEX_UNLOCK #elif I_HAS_PERL(5, 9, 3) -# define I_CHECK_MUTEX_LOCK OP_REFCNT_LOCK -# define I_CHECK_MUTEX_UNLOCK OP_REFCNT_UNLOCK +# define I_CHECK_LOCK OP_REFCNT_LOCK +# define I_CHECK_UNLOCK OP_REFCNT_UNLOCK #else /* Before perl 5.9.3, indirect_ck_*() calls are already protected by the * I_LOADED mutex, which falls back to the OP_REFCNT mutex. Make sure we don't * lock it twice. */ -# define I_CHECK_MUTEX_LOCK NOOP -# define I_CHECK_MUTEX_UNLOCK NOOP +# define I_CHECK_LOCK NOOP +# define I_CHECK_UNLOCK NOOP #endif typedef OP *(*indirect_ck_t)(pTHX_ OP *); @@ -190,24 +190,24 @@ typedef OP *(*indirect_ck_t)(pTHX_ OP *); static void indirect_ck_replace(pTHX_ OPCODE type, indirect_ck_t new_ck, indirect_ck_t *old_ck_p) { #define indirect_ck_replace(T, NC, OCP) indirect_ck_replace(aTHX_ (T), (NC), (OCP)) - I_CHECK_MUTEX_LOCK; + I_CHECK_LOCK; if (!*old_ck_p) { *old_ck_p = PL_check[type]; PL_check[type] = new_ck; } - I_CHECK_MUTEX_UNLOCK; + I_CHECK_UNLOCK; } #endif static void indirect_ck_restore(pTHX_ OPCODE type, indirect_ck_t *old_ck_p) { #define indirect_ck_restore(T, OCP) indirect_ck_restore(aTHX_ (T), (OCP)) - I_CHECK_MUTEX_LOCK; + I_CHECK_LOCK; if (*old_ck_p) { PL_check[type] = *old_ck_p; *old_ck_p = 0; } - I_CHECK_MUTEX_UNLOCK; + I_CHECK_UNLOCK; } /* --- Helpers ------------------------------------------------------------- */