summaryrefslogtreecommitdiff
path: root/op.h
diff options
context:
space:
mode:
authorSteve Hay <SteveHay@planit.com>2004-11-16 09:42:50 +0000
committerSteve Hay <SteveHay@planit.com>2004-11-16 09:42:50 +0000
commit4026c95ac795414220d662f764bd6e993724505d (patch)
tree04a79e3b2ce2e22e973f154adbbdeae3c3b9d03e /op.h
parent68ccb645d74feb45c64863c3223051537fbc9fed (diff)
downloadperl-4026c95ac795414220d662f764bd6e993724505d.tar.gz
Fix Win32 breakage caused by changes to op.c in change 23433.
Also limit the scope of the locks in a couple of places, as suggested by Hugo in http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2004-11/msg00286.html. p4raw-id: //depot/perl@23499
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