+/* --- Threads and multiplicity -------------------------------------------- */
+
+#ifndef NOOP
+# define NOOP
+#endif
+
+#ifndef dNOOP
+# define dNOOP
+#endif
+
+#if defined(MULTIPLICITY) || defined(PERL_IMPLICIT_CONTEXT)
+# define VMG_MULTIPLICITY 1
+# ifndef tTHX
+# define tTHX PerlInterpreter*
+# endif
+#else
+# define VMG_MULTIPLICITY 0
+#endif
+
+#if VMG_MULTIPLICITY && defined(dMY_CXT) && defined(MY_CXT) && defined(START_MY_CXT) && defined(MY_CXT_INIT) && defined(MY_CXT_CLONE)
+# define VMG_THREADSAFE 1
+#else
+# define VMG_THREADSAFE 0
+# undef dMY_CXT
+# define dMY_CXT dNOOP
+# undef MY_CXT
+# define MY_CXT vmg_globaldata
+# undef START_MY_CXT
+# define START_MY_CXT STATIC my_cxt_t MY_CXT;
+# undef MY_CXT_INIT
+# define MY_CXT_INIT NOOP
+# undef MY_CXT_CLONE
+# define MY_CXT_CLONE NOOP
+#endif
+