aboutsummaryrefslogtreecommitdiff
path: root/py/mpthread.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-05-31 15:25:40 +0100
committerDamien George <damien.p.george@gmail.com>2016-06-28 11:28:52 +0100
commit77e37ff98bec1ccf6af6edf3efcad26b54da0c47 (patch)
treee98fa51b79b1e8f98d4e4a5fc8f5d695fffeee8f /py/mpthread.h
parent15e68277c109d238bfb9c5bb8ab7db2f89e24c26 (diff)
py/mpthread: Include mpstate.h when defining GIL macros.
Diffstat (limited to 'py/mpthread.h')
-rw-r--r--py/mpthread.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/mpthread.h b/py/mpthread.h
index 7f8d4dec7..04d4f1968 100644
--- a/py/mpthread.h
+++ b/py/mpthread.h
@@ -50,6 +50,7 @@ void mp_thread_mutex_unlock(mp_thread_mutex_t *mutex);
#endif // MICROPY_PY_THREAD
#if MICROPY_PY_THREAD && MICROPY_PY_THREAD_GIL
+#include "py/mpstate.h"
#define MP_THREAD_GIL_ENTER() mp_thread_mutex_lock(&MP_STATE_VM(gil_mutex), 1)
#define MP_THREAD_GIL_EXIT() mp_thread_mutex_unlock(&MP_STATE_VM(gil_mutex))
#else