summaryrefslogtreecommitdiffstatshomepage
path: root/py/mpconfig.h
diff options
context:
space:
mode:
Diffstat (limited to 'py/mpconfig.h')
-rw-r--r--py/mpconfig.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 084fc246f5..aec5d40826 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -824,6 +824,17 @@ typedef double mp_float_t;
#define MICROPY_PY_UERRNO (0)
#endif
+// Whether to provide "_thread" module
+#ifndef MICROPY_PY_THREAD
+#define MICROPY_PY_THREAD (0)
+#endif
+
+// Whether to make the VM/runtime thread-safe using a global lock
+// If not enabled then thread safety must be provided at the Python level
+#ifndef MICROPY_PY_THREAD_GIL
+#define MICROPY_PY_THREAD_GIL (MICROPY_PY_THREAD)
+#endif
+
// Extended modules
#ifndef MICROPY_PY_UCTYPES
@@ -888,6 +899,10 @@ typedef double mp_float_t;
#define MICROPY_PY_FRAMEBUF (0)
#endif
+#ifndef MICROPY_PY_BTREE
+#define MICROPY_PY_BTREE (0)
+#endif
+
/*****************************************************************************/
/* Hooks for a port to add builtins */
@@ -1031,6 +1046,11 @@ typedef double mp_float_t;
#define MP_WEAK __attribute__((weak))
#endif
+// Modifier for functions which should be never inlined
+#ifndef MP_NOINLINE
+#define MP_NOINLINE __attribute__((noinline))
+#endif
+
// Condition is likely to be true, to help branch prediction
#ifndef MP_LIKELY
#define MP_LIKELY(x) __builtin_expect((x), 1)