summaryrefslogtreecommitdiff
path: root/op.h
diff options
context:
space:
mode:
Diffstat (limited to 'op.h')
-rw-r--r--op.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/op.h b/op.h
index d72c52e77c..2e7316890d 100644
--- a/op.h
+++ b/op.h
@@ -481,8 +481,13 @@ struct loop {
#ifdef USE_ITHREADS
# define OP_REFCNT_INIT MUTEX_INIT(&PL_op_mutex)
-# define OP_REFCNT_LOCK MUTEX_LOCK(&PL_op_mutex)
-# define OP_REFCNT_UNLOCK MUTEX_UNLOCK(&PL_op_mutex)
+# ifdef PERL_CORE
+# define OP_REFCNT_LOCK MUTEX_LOCK(&PL_op_mutex)
+# define OP_REFCNT_UNLOCK MUTEX_UNLOCK(&PL_op_mutex)
+# else
+# define OP_REFCNT_LOCK op_refcnt_lock()
+# define OP_REFCNT_UNLOCK op_refcnt_unlock()
+# endif
# define OP_REFCNT_TERM MUTEX_DESTROY(&PL_op_mutex)
#else
# define OP_REFCNT_INIT NOOP