# define MY_CXT_CLONE NOOP
#endif
+#if VMG_THREADSAFE
+# define VMG_LOCK(M) MUTEX_LOCK(M)
+# define VMG_UNLOCK(M) MUTEX_UNLOCK(M)
+#else
+# define VMG_LOCK(M)
+# define VMG_UNLOCK(M)
+#endif
+
#if VMG_THREADSAFE
STATIC SV *vmg_clone(pTHX_ SV *sv, tTHX owner) {
#define vmg_op_info_init(W) vmg_op_info_init(aTHX_ (W))
switch (opinfo) {
case VMG_OP_INFO_NAME:
-#if VMG_THREADSAFE
- MUTEX_LOCK(&vmg_op_name_init_mutex);
-#endif
+ VMG_LOCK(&vmg_op_name_init_mutex);
if (!vmg_op_name_init) {
OPCODE t;
for (t = 0; t < OP_max; ++t)
vmg_op_name_len[t] = strlen(PL_op_name[t]);
vmg_op_name_init = 1;
}
-#if VMG_THREADSAFE
- MUTEX_UNLOCK(&vmg_op_name_init_mutex);
-#endif
+ VMG_UNLOCK(&vmg_op_name_init_mutex);
break;
case VMG_OP_INFO_OBJECT: {
dMY_CXT;