Rename I_CHECK_MUTEX_* to I_CHECK_*
authorVincent Pit <vince@profvince.com>
Mon, 6 Apr 2015 19:51:36 +0000 (16:51 -0300)
committerVincent Pit <vince@profvince.com>
Mon, 6 Apr 2015 19:51:36 +0000 (16:51 -0300)
indirect.xs

index bd52eee..0de84e5 100644 (file)
 #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 ------------------------------------------------------------- */