commit | 1f54ad2aed0dc8f2d868ccd89ccf639a475e8022 | [log] [tgz] |
---|---|---|
author | Damien George <damien.p.george@gmail.com> | Thu May 26 09:06:46 2016 +0000 |
committer | Damien George <damien.p.george@gmail.com> | Tue Jun 28 11:28:50 2016 +0100 |
tree | 101ef4b66e198a1d5708890567ab3ab4501c9201 | |
parent | b7274e91bc2fe6a8059ce7e65e02c20d000322b1 [diff] [blame] |
py: Make interning of qstrs thread safe.
diff --git a/py/mpstate.h b/py/mpstate.h index f1f8fd9..3ee243d 100644 --- a/py/mpstate.h +++ b/py/mpstate.h
@@ -164,6 +164,11 @@ size_t qstr_last_alloc; size_t qstr_last_used; + #if MICROPY_PY_THREAD + // This is a global mutex used to make qstr interning thread-safe. + mp_thread_mutex_t qstr_mutex; + #endif + mp_uint_t mp_optimise_value; // size of the emergency exception buf, if it's dynamically allocated