py/mpthread: Include mpstate.h when defining GIL macros.

pull/2165/head
Damien George 2016-05-31 15:25:40 +01:00
rodzic 15e68277c1
commit 77e37ff98b
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -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